From c3cbafbae32adf89bcc14b0f3cee0117d6497ece Mon Sep 17 00:00:00 2001 From: phil Date: Sun, 3 Nov 2024 16:06:44 +0100 Subject: [PATCH] CI: build container when the version is a clean git tag 1 --- .forgejo/workflows/build.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 9ea2300..0b29a42 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -43,12 +43,10 @@ jobs: - name: Check if the container should be built id: builder - env: - builder: ${{ inputs.build || !contains(steps.version.output.version, '-') }} - run: echo $builder + run: echo "run=${{ inputs.build || !contains(steps.version.output.version, '-') }}" >> $GITHUB_OUTPUT - name: Build container - if: ${{ steps.builder.builder }} + if: ${{ steps.builder.output.run }} uses: actions/buildah-build@v1 with: image: treetrail-frontend @@ -59,13 +57,13 @@ jobs: ./Containerfile - name: Workaround for bug of podman-login - if: ${{ steps.builder.builder }} + if: ${{ steps.builder.output.run }} run: | mkdir -p $HOME/.docker echo "{ \"auths\": {} }" > $HOME/.docker/config.json - name: Log in to container registry (with another workaround) - if: ${{ steps.builder.builder }} + if: ${{ steps.builder.output.run }} uses: actions/podman-login@v1 with: registry: ${{ vars.REGISTRY }} @@ -74,7 +72,7 @@ jobs: auth_file_path: /tmp/auth.json - uses: actions/push-to-registry@v2 - if: ${{ steps.builder.builder }} + if: ${{ steps.builder.output.run }} with: registry: "docker://${{ vars.REGISTRY }}" image: treetrail-frontend