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