File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -137,19 +137,17 @@ jobs:
137137 gh attestation verify \
138138 oci://ghcr.io/hoverkraft-tech/ci-github-container/"${IMAGE_NAME}" \
139139 --repo hoverkraft-tech/ci-github-container
140- exit $?
141- fi
142-
143- echo "Image ${IMAGE_NAME} should not have an attestation"
144- if gh attestation verify \
145- oci://ghcr.io/hoverkraft-tech/ci-github-container/" ${IMAGE_NAME}" \
146- --repo hoverkraft-tech/ci-github-container; then
147- echo "::error::Image ${IMAGE_NAME} should not be attested but attestation verification succeeded"
148- exit 1
140+ else
141+ echo "Image ${IMAGE_NAME} should not have an attestation"
142+ if gh attestation verify \
143+ oci://ghcr.io/hoverkraft-tech/ci-github-container/" ${IMAGE_NAME}" \
144+ --repo hoverkraft-tech/ci-github-container; then
145+ echo "::error::Image ${IMAGE_NAME} should not be attested but attestation verification succeeded"
146+ exit 1
147+ fi
148+ echo "Attestation verification failed as expected for non-attested image ${IMAGE_NAME}"
149149 fi
150150
151- echo "Attestation verification failed as expected for non-attested image ${IMAGE_NAME}"
152-
153151 cleanup :
154152 name : Cleanup ephemeral test packages
155153 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments