Files
hub/.gitea/workflows/build-lyrica.yml
T
nmemmert ae00f61711
build-lyrics-container / build (push) Successful in 6m56s
build-container / build (push) Successful in 3m10s
CI: build the Lyrica image only when ./lyrica changes (its own workflow), so a Docker Hub timeout cannot fail the main build
2026-10-23 11:37:39 -04:00

38 lines
1.4 KiB
YAML

name: build-lyrics-container
# The lyrics container (Lyrica, pinned to one commit) only changes when ./lyrica does, so it is built only then (or by hand with "Run workflow").
# Building it on every push meant a needless restart of the lyrics service each time, and a failed pull of its Python base image failed the whole run.
on:
push:
branches: [main]
paths: ['lyrica/**', '.gitea/workflows/build-lyrica.yml']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: git.necloud.us
username: ${{ secrets.REGISTRY_USER || gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- id: meta_ly
uses: docker/metadata-action@v5
with:
images: git.necloud.us/nate/hub-lyrica
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=short
- uses: docker/build-push-action@v6
with:
context: ./lyrica
platforms: linux/amd64
push: true
tags: ${{ steps.meta_ly.outputs.tags }}
labels: ${{ steps.meta_ly.outputs.labels }}
cache-from: type=registry,ref=git.necloud.us/nate/hub-lyrica:buildcache
cache-to: type=registry,ref=git.necloud.us/nate/hub-lyrica:buildcache,mode=max