@@ -17,6 +17,7 @@ defaults:
1717 shell : bash
1818
1919env :
20+ PUSH : ${{ github.event == 'push' && github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
2021 CONTAINER_REGISTRY : ghcr.io
2122 BUILDKIT_PROGRESS : plain
2223 CONAN_VERSION : 2.19.1
@@ -137,21 +138,21 @@ jobs:
137138 BASE_IMAGE=${{ env.CONTAINER_IMAGE_GCC && format('{0}:{1}-{2}', env.CONTAINER_IMAGE_GCC, matrix.os.compiler_version, matrix.os.release) || format('gcc:{0}-{1}', matrix.os.compiler_version, matrix.os.release) }}
138139 context : .
139140 file : docker/debian/Dockerfile
140- outputs : type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=true
141+ outputs : type=image,name=${{ env.CONTAINER_IMAGE }},push-by-digest=true,name-canonical=true,push=${{ env.PUSH }}
141142 platforms : ${{ matrix.architecture.platform }}
142143 provenance : mode=max
143- push : ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
144+ push : ${{ env.PUSH }}
144145 sbom : true
145146 labels : ${{ steps.meta.outputs.labels }}
146147 target : ${{ matrix.os.compiler_name }}
147148 - name : Export digest
148- if : ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
149+ if : ${{ env.PUSH }}
149150 run : |
150151 mkdir -p /tmp/digests
151152 DIGEST="${{ steps.build.outputs.digest }}"
152153 touch "/tmp/digests/${DIGEST#sha256:}"
153154 - name : Upload digest
154- if : ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
155+ if : ${{ env.PUSH }}
155156 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
156157 with :
157158 name : digests-${{ matrix.os.release }}-${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}-${{ env.PLATFORM_PAIR }}
@@ -160,7 +161,7 @@ jobs:
160161 retention-days : 1
161162
162163 merge :
163- if : ${{ github.ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
164+ if : ${{ github.event == 'push' && github. ref_type == 'branch' && github.ref_name == github.event.repository.default_branch }}
164165 strategy :
165166 matrix :
166167 os :
0 commit comments