forked from iv-org/invidious
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'iv-org:master' into master
- Loading branch information
Showing
183 changed files
with
9,391 additions
and
5,189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: Build and release container directly from master | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
paths-ignore: | ||
- "*.md" | ||
- LICENCE | ||
- TRANSLATION | ||
- invidious.service | ||
- .git* | ||
- .editorconfig | ||
- screenshots/* | ||
- .github/ISSUE_TEMPLATE/* | ||
- kubernetes/** | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Crystal | ||
uses: crystal-lang/[email protected] | ||
with: | ||
crystal: 1.12.2 | ||
|
||
- name: Run lint | ||
run: | | ||
if ! crystal tool format --check; then | ||
crystal tool format | ||
git diff | ||
exit 1 | ||
fi | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: quay.io/invidious/invidious | ||
tags: | | ||
type=sha,format=short,prefix={{date 'YYYY.MM.DD'}}-,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} | ||
type=raw,value=master,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} | ||
labels: | | ||
quay.expires-after=12w | ||
- name: Build and push Docker AMD64 image for Push Event | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
platforms: linux/amd64 | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
build-args: | | ||
"release=1" | ||
- name: Docker meta | ||
id: meta-arm64 | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: quay.io/invidious/invidious | ||
flavor: | | ||
suffix=-arm64 | ||
tags: | | ||
type=sha,format=short,prefix={{date 'YYYY.MM.DD'}}-,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} | ||
type=raw,value=master,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} | ||
labels: | | ||
quay.expires-after=12w | ||
- name: Build and push Docker ARM64 image for Push Event | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: docker/Dockerfile.arm64 | ||
platforms: linux/arm64/v8 | ||
labels: ${{ steps.meta-arm64.outputs.labels }} | ||
push: true | ||
tags: ${{ steps.meta-arm64.outputs.tags }} | ||
build-args: | | ||
"release=1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Build and release container | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Crystal | ||
uses: crystal-lang/[email protected] | ||
with: | ||
crystal: 1.12.2 | ||
|
||
- name: Run lint | ||
run: | | ||
if ! crystal tool format --check; then | ||
crystal tool format | ||
git diff | ||
exit 1 | ||
fi | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: quay.io/invidious/invidious | ||
flavor: | | ||
latest=false | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=raw,value=latest | ||
labels: | | ||
quay.expires-after=12w | ||
- name: Build and push Docker AMD64 image for Push Event | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: docker/Dockerfile | ||
platforms: linux/amd64 | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
build-args: | | ||
"release=1" | ||
- name: Docker meta | ||
id: meta-arm64 | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: quay.io/invidious/invidious | ||
flavor: | | ||
latest=false | ||
suffix=-arm64 | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=raw,value=latest | ||
labels: | | ||
quay.expires-after=12w | ||
- name: Build and push Docker ARM64 image for Push Event | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: docker/Dockerfile.arm64 | ||
platforms: linux/arm64/v8 | ||
labels: ${{ steps.meta-arm64.outputs.labels }} | ||
push: true | ||
tags: ${{ steps.meta-arm64.outputs.tags }} | ||
build-args: | | ||
"release=1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,22 +38,21 @@ jobs: | |
matrix: | ||
stable: [true] | ||
crystal: | ||
- 1.4.1 | ||
- 1.5.1 | ||
- 1.6.2 | ||
- 1.7.3 | ||
- 1.8.1 | ||
- 1.9.2 | ||
- 1.10.1 | ||
- 1.11.2 | ||
- 1.12.1 | ||
include: | ||
- crystal: nightly | ||
stable: false | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Install Crystal | ||
uses: crystal-lang/install-crystal@v1.7.0 | ||
uses: crystal-lang/install-crystal@v1.8.0 | ||
with: | ||
crystal: ${{ matrix.crystal }} | ||
|
||
|
@@ -88,13 +87,13 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build Docker | ||
run: docker-compose build --build-arg release=0 | ||
run: docker compose build --build-arg release=0 | ||
|
||
- name: Run Docker | ||
run: docker-compose up -d | ||
run: docker compose up -d | ||
|
||
- name: Test Docker | ||
run: while curl -Isf http://localhost:3000; do sleep 1; done | ||
|
@@ -104,18 +103,18 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
platforms: arm64 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build Docker ARM64 image | ||
uses: docker/build-push-action@v3 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: docker/Dockerfile.arm64 | ||
|
@@ -125,4 +124,28 @@ jobs: | |
- name: Test Docker | ||
run: while curl -Isf http://localhost:3000; do sleep 1; done | ||
|
||
ameba_lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- name: Install Crystal | ||
uses: crystal-lang/[email protected] | ||
with: | ||
crystal: latest | ||
|
||
- name: Cache Shards | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
./lib | ||
./bin | ||
key: shards-${{ hashFiles('shard.lock') }} | ||
|
||
- name: Install Shards | ||
run: shards install | ||
|
||
- name: Run Ameba linter | ||
run: bin/ameba |
Oops, something went wrong.