Skip to content

add companion to let Invidious start #20

add companion to let Invidious start

add companion to let Invidious start #20

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:
strategy:
matrix:
include:
- os: ubuntu-latest
platforms: linux/amd64
name: "AMD64"
dockerfile: "docker/Dockerfile"
tag_suffix: ""
# GitHub doesn't has a ubuntu-latest-arm runner
- os: ubuntu-24.04-arm
platforms: linux/arm64/v8
name: "ARM64"
dockerfile: "docker/Dockerfile.arm64"
tag_suffix: "-arm64"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry
uses: docker/login-action@v3
with:
registry: git.nadeko.net
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: git.nadeko.net/fijxu/invidious_do_not_pull
flavor: |
suffix=${{ matrix.tag_suffix }}
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: Cache Invidious compilation objects
uses: actions/cache@v4
id: cache
with:
path: |
invidious-compilation-cache
key: cache-${{ hashFiles('.github/workflows/build-nightly-container.yml') }}-${{ matrix.os }}
- name: Inject cache into Docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"invidious-compilation-cache": "/root/.cache/crystal"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
- name: Build and push Docker ${{ matrix.name }} image for Push Event
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
"release=1"