mirror of
https://github.com/iv-org/invidious.git
synced 2026-09-06 00:52:45 -05:00
CI: build+push ArikTube container to ghcr.io on the arik branch
Gate first: crystal spec + format-strict build on 1.20.3 (mirrors upstream ci.yml). Then a linux/amd64 image build pushed as ghcr.io/neskiredk/invidious:latest + :sha-<commit>. No expiry label. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
8e5a9e079e
commit
f771983e25
85
.github/workflows/build-arik-container.yml
vendored
Normal file
85
.github/workflows/build-arik-container.yml
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
name: Build ArikTube container
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- arik
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- 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"
|
||||
Loading…
x
Reference in New Issue
Block a user