invidious/.github/workflows/build-arik-container.yml
NeskireDK 3fa2f55437 Fix workflow submodule checkout failure
Remove submodules: true from actions/checkout since the mocks
submodule is not accessible and not needed for the build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-12 18:00:03 +02:00

84 lines
1.9 KiB
YAML

name: Build ArikTube container
on:
workflow_dispatch:
push:
branches:
- arik
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install required APT packages
run: sudo apt install -y libsqlite3-dev
- name: Install Crystal
uses: crystal-lang/install-crystal@v1.9.2
with:
crystal: 1.20.3
- name: Cache Shards
uses: actions/cache@v6
with:
path: |
./lib
./bin
key: shards-${{ hashFiles('shard.lock') }}
- name: Install Shards
run: |
if ! shards check; then
shards install --skip-postinstall --skip-executables
fi
- name: Run tests
run: crystal spec
- name: Build
run: crystal build --warnings all --error-on-warnings --error-trace src/invidious.cr
build:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Login to registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/neskiredk/invidious
flavor: |
latest=false
tags: |
type=raw,value=latest
type=sha
- name: Build and push
uses: docker/build-push-action@v7
with:
context: .
file: docker/Dockerfile
platforms: linux/amd64
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
"release=1"