@@ -38,6 +38,7 @@ permissions:
3838
3939env :
4040 CARGO_TERM_COLOR : always
41+ PUSH_IMAGE : ${{ inputs.push || github.event.inputs.push == 'true' }}
4142
4243jobs :
4344 build-binaries :
@@ -146,7 +147,7 @@ jobs:
146147 fi
147148
148149 TAGS="ghcr.io/always-further/nono:${VERSION}"
149- if [ "${{ inputs.push } }" = "true" ] && [ "$STABLE" = "true" ] && [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
150+ if [ "${PUSH_IMAGE }" = "true" ] && [ "$STABLE" = "true" ] && [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
150151 MAJOR_MINOR="${VERSION%.*}"
151152 TAGS="${TAGS},ghcr.io/always-further/nono:${MAJOR_MINOR}"
152153 TAGS="${TAGS},ghcr.io/always-further/nono:latest"
@@ -163,7 +164,7 @@ jobs:
163164 uses : docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
164165
165166 - name : Log in to ghcr.io
166- if : ${{ inputs.push }}
167+ if : ${{ env.PUSH_IMAGE == 'true' }}
167168 uses : docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
168169 with :
169170 registry : ghcr.io
@@ -177,19 +178,19 @@ jobs:
177178 context : docker-context
178179 file : docker-context/Dockerfile
179180 platforms : linux/amd64,linux/arm64
180- push : ${{ inputs.push }}
181+ push : ${{ env.PUSH_IMAGE == 'true' }}
181182 tags : ${{ steps.meta.outputs.tags }}
182183 labels : |
183184 org.opencontainers.image.source=https://github.com/always-further/nono
184185 org.opencontainers.image.version=${{ steps.meta.outputs.version }}
185186 org.opencontainers.image.description=Capability-based sandboxing for untrusted AI agents
186187
187188 - name : Install Cosign
188- if : ${{ inputs.push }}
189+ if : ${{ env.PUSH_IMAGE == 'true' }}
189190 uses : sigstore/cosign-installer@7e8b541eb2e61bf99390e1afd4be13a184e9ebc5 # v3.10.1
190191
191192 - name : Sign image with Cosign
192- if : ${{ inputs.push }}
193+ if : ${{ env.PUSH_IMAGE == 'true' }}
193194 run : |
194195 cosign sign --yes \
195196 ghcr.io/always-further/nono@${{ steps.push.outputs.digest }}
0 commit comments