Skip to content

Commit

Permalink
setting the correct image digest
Browse files Browse the repository at this point in the history
  • Loading branch information
pacostas committed Dec 16, 2024
1 parent 18d8a01 commit e372175
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,21 @@ jobs:

- name: Get Image Digest
id: image_digest

run: |
image_name="localhost:5000/npm-install:latest"
./scripts/publish.sh \
--buildpack-archive ./build/buildpack.tgz \
--image-ref $image_name
digest=$(sudo skopeo inspect "docker://${image_name}" --tls-verify=false | jq -r .Digest)
echo $digest
echo $digest >> "$GITHUB_OUTPUT"
echo "digest=$(sudo skopeo inspect "docker://${image_name}" --tls-verify=false | jq -r .Digest)" >> "$GITHUB_OUTPUT"
- name: Set Correct Image Digest on the Release notes
run: |
printf '${{ steps.create-release-notes.outputs.release_body }}' \
| sed -E \
"s/\*\*Digest:\*\* \`sha256:[a-f0-9]{64}\`/\*\*Digest:\*\* \`${{ steps.image_digest.outputs.digest }}\`/" \
> ./release_notes
- name: Create release assets
id: create_release_assets
Expand Down Expand Up @@ -194,7 +198,7 @@ jobs:
tag_name: v${{ steps.tag.outputs.tag }}
target_commitish: ${{ github.sha }}
name: v${{ steps.tag.outputs.tag }}
body: ${{ steps.create-release-notes.outputs.release_body }}
body_filepath: "./release_notes"
draft: true
assets: ${{ steps.create_release_assets.outputs.release_assets }}

Expand Down

0 comments on commit e372175

Please sign in to comment.