From 27ca47997f9753027f69a4fd5479e005a26b6baa Mon Sep 17 00:00:00 2001 From: myrmidex Date: Sun, 16 Aug 2026 12:07:16 +0200 Subject: [PATCH] 62 - Build the production image on tags only --- .forgejo/workflows/build.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index b5d92c4..225081a 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -1,8 +1,9 @@ name: Build and Push Docker Image on: + # Tags only. A release merges to main and is tagged at the same commit, so a + # branch trigger here would build and push the image twice. push: - branches: [main] tags: ['v*'] jobs: @@ -30,12 +31,8 @@ jobs: - name: Determine tags id: meta run: | - if [[ "${{ github.ref }}" == refs/tags/v* ]]; then - TAG="${{ github.ref_name }}" - echo "tags=forge.lvl0.xyz/lvl0/incr:${TAG},forge.lvl0.xyz/lvl0/incr:latest" >> $GITHUB_OUTPUT - else - echo "tags=forge.lvl0.xyz/lvl0/incr:latest" >> $GITHUB_OUTPUT - fi + TAG="${{ github.ref_name }}" + echo "tags=forge.lvl0.xyz/lvl0/incr:${TAG},forge.lvl0.xyz/lvl0/incr:latest" >> $GITHUB_OUTPUT - name: Build and push uses: https://data.forgejo.org/docker/build-push-action@v5