File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ jobs:
112112 password : ${{ env.GCR_PASSWORD }}
113113 registry : ${{ env.GCR_REGISTRY }}
114114
115+ - uses : buildpacks/github-actions/setup-tools@v5.5.4
115116 - name : Push to DockerHub
116117 if : ${{ steps.parse_configs.outputs.push_to_dockerhub == 'true' }}
117118 id : push
@@ -126,11 +127,14 @@ jobs:
126127 --buildpack-type ${{ steps.get_buildpack_type.outputs.buildpack_type }} \
127128 --image-ref "${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_full }}"
128129
129- ## Validate that the digest pushed to registry matches with the one mentioned on the readme file
130- pushed_image_index_digest=$(sudo skopeo inspect "docker://${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_full }}" | jq -r .Digest)
130+ ## Validate that the image index digest pushed to registry matches with the one on the release notes
131+ pushed_image_index_digest=$(crane digest "${DOCKERHUB_REGISTRY}/${IMAGE}:${{ steps.event.outputs.tag_full }}" | xargs)
132+
133+ echo "Index digest from release notes: $(cat ./index-digest.sha256)"
134+ echo "Index digest pushed to registry: $pushed_image_index_digest"
131135
132136 if [ "$(cat ./index-digest.sha256)" != "$pushed_image_index_digest" ]; then
133- echo "Image index digest pushed to registry does not match with the one mentioned on the readme file "
137+ echo "The image index digest pushed to registry does not match the expected digest from release notes "
134138 exit 1;
135139 fi
136140
You can’t perform that action at this time.
0 commit comments