invidious-copy-2023-06-08/.github/workflows/container-release.yml

83 lines
2.2 KiB
YAML
Raw Normal View History

2021-01-16 21:18:22 +00:00
name: Build and release container
on:
2023-05-21 13:09:47 +00:00
workflow_dispatch:
2021-01-16 21:18:22 +00:00
push:
2023-05-02 06:26:39 +00:00
schedule:
- cron: "05 05 05 * *" # Build it every mouth on 5
2021-01-16 21:18:22 +00:00
branches:
2023-04-28 13:28:26 +00:00
- "CICD"
paths-ignore:
- "*.md"
- LICENCE
- TRANSLATION
- invidious.service
- .git*
- .editorconfig
- screenshots/*
- .github/ISSUE_TEMPLATE/*
2023-04-28 13:28:26 +00:00
- .github/workflows/*
- kubernetes/**
2021-01-16 21:18:22 +00:00
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Crystal
uses: crystal-lang/install-crystal@v1.6.0
with:
crystal: 1.5.0
- name: Run lint
run: |
if ! crystal tool format --check; then
crystal tool format
git diff
exit 1
fi
2021-01-16 21:18:22 +00:00
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
2021-01-16 21:18:22 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
2021-01-16 21:18:22 +00:00
- name: Login to registry
uses: docker/login-action@v2
2021-01-16 21:18:22 +00:00
with:
2023-04-28 13:28:26 +00:00
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
2021-01-16 21:18:22 +00:00
- name: Build and push Docker AMD64 image without QUIC for Push Event
2023-05-21 12:44:47 +00:00
if: github.ref == 'refs/heads/CICD'
uses: docker/build-push-action@v3
2021-01-16 21:18:22 +00:00
with:
2021-01-21 06:45:43 +00:00
context: .
file: docker/Dockerfile
platforms: linux/amd64
2021-01-16 21:18:22 +00:00
push: true
2023-04-28 13:28:26 +00:00
tags: docker.io/john3box/invidious-loginonly:${{ github.sha }}-amd64,docker.io/john3box/invidious-loginonly:latest-amd64
build-args: |
"release=1"
"disable_quic=1"
- name: Build and push Docker ARM64 image without QUIC for Push Event
2023-05-21 12:44:47 +00:00
if: github.ref == 'refs/heads/CICD'
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile.arm64
platforms: linux/arm64/v8
push: true
2023-04-28 13:28:26 +00:00
tags: docker.io/john3box/invidious-loginonly:${{ github.sha }}-arm64,docker.io/john3box/invidious-loginonly:latest-arm64
build-args: |
"release=1"
"disable_quic=1"