diff --git a/.gitea/workflows/build-containers-on-demand.yml b/.gitea/workflows/build-containers-on-demand.yml index c1f79a0..21ec42c 100644 --- a/.gitea/workflows/build-containers-on-demand.yml +++ b/.gitea/workflows/build-containers-on-demand.yml @@ -211,28 +211,17 @@ jobs: echo "ERROR: Found $ctype \"$cname\" image repo is \"$new_repo\" but expected \"$expected_repo\"" exit 1 fi - if [ -n "${old_image:-}" ]; then - old_tag="${old_image##*:}" - else - old_tag="" - fi registry="$(echo "$new_repo" | awk -F/ '{print $1}')" { - echo "changed=$([ "$old_tag" != "$new_tag" ] && echo true || echo false)" echo "new_image=$new_image" echo "new_repo=$new_repo" echo "new_tag=$new_tag" echo "registry=$registry" } >> "$GITHUB_OUTPUT" - - name: Skip if tag unchanged - if: steps.img.outputs.changed != 'true' - run: echo "${{ matrix.description }} image tag unchanged; skipping build." - - name: Check if image exists on registry - if: steps.img.outputs.changed == 'true' id: check_image shell: bash run: | @@ -267,15 +256,15 @@ jobs: fi - name: Skip if image already exists - if: steps.img.outputs.changed == 'true' && steps.check_image.outputs.exists == 'true' + if: steps.check_image.outputs.exists == 'true' run: echo "${{ matrix.description }} image ${{ steps.img.outputs.new_image }} already exists on registry; skipping build." - name: Set up Buildx - if: steps.img.outputs.changed == 'true' && steps.check_image.outputs.exists == 'false' + if: steps.check_image.outputs.exists == 'false' uses: docker/setup-buildx-action@v3 - name: Log in to registry - if: steps.img.outputs.changed == 'true' && steps.check_image.outputs.exists == 'false' + if: steps.check_image.outputs.exists == 'false' uses: docker/login-action@v3 with: registry: ${{ steps.img.outputs.registry }} @@ -283,7 +272,7 @@ jobs: password: ${{ secrets.REGISTRY_PASSWORD }} - name: Build and push ${{ matrix.description }} (exact tag from deployment) - if: steps.img.outputs.changed == 'true' && steps.check_image.outputs.exists == 'false' + if: steps.check_image.outputs.exists == 'false' uses: docker/build-push-action@v6 with: context: ${{ matrix.build_context }}