From ae00f6171178aefab6ba9fc55425db719e16a31f Mon Sep 17 00:00:00 2001 From: nmemmert <67961292+nmemmert@users.noreply.github.com> Date: Fri, 23 Oct 2026 11:37:39 -0400 Subject: [PATCH] CI: build the Lyrica image only when ./lyrica changes (its own workflow), so a Docker Hub timeout cannot fail the main build --- .gitea/workflows/build-lyrica.yml | 37 +++++++++++++++++++++++++++++++ .gitea/workflows/build.yml | 18 --------------- 2 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 .gitea/workflows/build-lyrica.yml diff --git a/.gitea/workflows/build-lyrica.yml b/.gitea/workflows/build-lyrica.yml new file mode 100644 index 0000000..f593e55 --- /dev/null +++ b/.gitea/workflows/build-lyrica.yml @@ -0,0 +1,37 @@ +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 diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 7dbb694..9d6712e 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -64,21 +64,3 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=registry,ref=git.necloud.us/nate/hub:buildcache cache-to: type=registry,ref=git.necloud.us/nate/hub:buildcache,mode=max - - # The lyrics container (Lyrica, pinned) - - 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 - type=ref,event=tag - - - 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 }}