Skip to content

Commit 45a5b5f

Browse files
committed
Updating github-config
1 parent 248915d commit 45a5b5f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/push-buildpackage.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)