mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
sync
This commit is contained in:
parent
9dfa268204
commit
0423412e5e
3 changed files with 7 additions and 184 deletions
128
.github/workflows/ci.yml
vendored
128
.github/workflows/ci.yml
vendored
|
@ -1,128 +0,0 @@
|
||||||
name: Invidious CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 * * *" # Every day at 00:00
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "master"
|
|
||||||
- "api-only"
|
|
||||||
pull_request:
|
|
||||||
branches: "*"
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- LICENCE
|
|
||||||
- TRANSLATION
|
|
||||||
- invidious.service
|
|
||||||
- .git*
|
|
||||||
- .editorconfig
|
|
||||||
|
|
||||||
- screenshots/*
|
|
||||||
- assets/**
|
|
||||||
- locales/*
|
|
||||||
- config/**
|
|
||||||
- .github/ISSUE_TEMPLATE/*
|
|
||||||
- kubernetes/**
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
name: "build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }}"
|
|
||||||
|
|
||||||
continue-on-error: ${{ !matrix.stable }}
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
stable: [true]
|
|
||||||
crystal:
|
|
||||||
- 1.4.1
|
|
||||||
- 1.5.1
|
|
||||||
- 1.6.2
|
|
||||||
- 1.7.3
|
|
||||||
- 1.8.1
|
|
||||||
include:
|
|
||||||
- crystal: nightly
|
|
||||||
stable: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: true
|
|
||||||
|
|
||||||
- name: Install Crystal
|
|
||||||
uses: crystal-lang/install-crystal@v1.7.0
|
|
||||||
with:
|
|
||||||
crystal: ${{ matrix.crystal }}
|
|
||||||
|
|
||||||
- name: Cache Shards
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ./lib
|
|
||||||
key: shards-${{ hashFiles('shard.lock') }}
|
|
||||||
|
|
||||||
- name: Install Shards
|
|
||||||
run: |
|
|
||||||
if ! shards check; then
|
|
||||||
shards install
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: crystal spec
|
|
||||||
|
|
||||||
- name: Run lint
|
|
||||||
run: |
|
|
||||||
if ! crystal tool format --check; then
|
|
||||||
crystal tool format
|
|
||||||
git diff
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: crystal build --warnings all --error-on-warnings --error-trace src/invidious.cr
|
|
||||||
|
|
||||||
build-docker:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Build Docker
|
|
||||||
run: docker-compose build --build-arg release=0
|
|
||||||
|
|
||||||
- name: Run Docker
|
|
||||||
run: docker-compose up -d
|
|
||||||
|
|
||||||
- name: Test Docker
|
|
||||||
run: while curl -Isf http://localhost:3000; do sleep 1; done
|
|
||||||
|
|
||||||
build-docker-arm64:
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v2
|
|
||||||
with:
|
|
||||||
platforms: arm64
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
|
|
||||||
- name: Build Docker ARM64 image
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: docker/Dockerfile.arm64
|
|
||||||
platforms: linux/arm64/v8
|
|
||||||
build-args: release=0
|
|
||||||
|
|
||||||
- name: Test Docker
|
|
||||||
run: while curl -Isf http://localhost:3000; do sleep 1; done
|
|
||||||
|
|
||||||
|
|
37
.github/workflows/container-release.yml
vendored
37
.github/workflows/container-release.yml
vendored
|
@ -3,7 +3,7 @@ name: Build and release container
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "master"
|
- "CICD"
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- "*.md"
|
- "*.md"
|
||||||
- LICENCE
|
- LICENCE
|
||||||
|
@ -14,6 +14,7 @@ on:
|
||||||
|
|
||||||
- screenshots/*
|
- screenshots/*
|
||||||
- .github/ISSUE_TEMPLATE/*
|
- .github/ISSUE_TEMPLATE/*
|
||||||
|
- .github/workflows/*
|
||||||
- kubernetes/**
|
- kubernetes/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -48,9 +49,9 @@ jobs:
|
||||||
- name: Login to registry
|
- name: Login to registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: quay.io
|
registry: docker.io
|
||||||
username: ${{ secrets.QUAY_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.QUAY_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Build and push Docker AMD64 image without QUIC for Push Event
|
- name: Build and push Docker AMD64 image without QUIC for Push Event
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
@ -61,7 +62,7 @@ jobs:
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
labels: quay.expires-after=12w
|
labels: quay.expires-after=12w
|
||||||
push: true
|
push: true
|
||||||
tags: quay.io/invidious/invidious:${{ github.sha }},quay.io/invidious/invidious:latest
|
tags: docker.io/john3box/invidious-loginonly:${{ github.sha }}-amd64,docker.io/john3box/invidious-loginonly:latest-amd64
|
||||||
build-args: |
|
build-args: |
|
||||||
"release=1"
|
"release=1"
|
||||||
"disable_quic=1"
|
"disable_quic=1"
|
||||||
|
@ -75,31 +76,7 @@ jobs:
|
||||||
platforms: linux/arm64/v8
|
platforms: linux/arm64/v8
|
||||||
labels: quay.expires-after=12w
|
labels: quay.expires-after=12w
|
||||||
push: true
|
push: true
|
||||||
tags: quay.io/invidious/invidious:${{ github.sha }}-arm64,quay.io/invidious/invidious:latest-arm64
|
tags: docker.io/john3box/invidious-loginonly:${{ github.sha }}-arm64,docker.io/john3box/invidious-loginonly:latest-arm64
|
||||||
build-args: |
|
build-args: |
|
||||||
"release=1"
|
"release=1"
|
||||||
"disable_quic=1"
|
"disable_quic=1"
|
||||||
|
|
||||||
- name: Build and push Docker AMD64 image with QUIC for Push Event
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: docker/Dockerfile
|
|
||||||
platforms: linux/amd64
|
|
||||||
labels: quay.expires-after=12w
|
|
||||||
push: true
|
|
||||||
tags: quay.io/invidious/invidious:${{ github.sha }}-quic,quay.io/invidious/invidious:latest-quic
|
|
||||||
build-args: release=1
|
|
||||||
|
|
||||||
- name: Build and push Docker ARM64 image with QUIC for Push Event
|
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
uses: docker/build-push-action@v3
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: docker/Dockerfile.arm64
|
|
||||||
platforms: linux/arm64/v8
|
|
||||||
labels: quay.expires-after=12w
|
|
||||||
push: true
|
|
||||||
tags: quay.io/invidious/invidious:${{ github.sha }}-arm64-quic,quay.io/invidious/invidious:latest-arm64-quic
|
|
||||||
build-args: release=1
|
|
||||||
|
|
26
.github/workflows/stale.yml
vendored
26
.github/workflows/stale.yml
vendored
|
@ -1,26 +0,0 @@
|
||||||
# Documentation: https://github.com/marketplace/actions/close-stale-issues
|
|
||||||
|
|
||||||
name: "Stale issue handler"
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 */12 * * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
stale:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/stale@v5
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
days-before-stale: 365
|
|
||||||
days-before-pr-stale: 45 # PRs should be active. Anything that hasn't had activity in more than 45 days should be considered abandoned.
|
|
||||||
days-before-close: 30
|
|
||||||
exempt-pr-labels: blocked
|
|
||||||
stale-issue-message: 'This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.'
|
|
||||||
stale-pr-message: 'This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely abandoned or outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked.'
|
|
||||||
stale-issue-label: "stale"
|
|
||||||
stale-pr-label: "stale"
|
|
||||||
ascending: true
|
|
||||||
# Never mark feature requests/enhancements as stale
|
|
||||||
exempt-issue-labels: "feature-request,enhancement,exempt-stale"
|
|
Loading…
Reference in a new issue