Skip to content

Commit

Permalink
fixup! wip: build(ci): test publish-dev-images.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
h4l committed Sep 14, 2024
1 parent b0d0be8 commit 87df374
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/publish-dev-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
packages: write
id-token: write # needed for signing the images with GitHub OIDC Token

steps:
- name: Checkout
Expand Down Expand Up @@ -66,10 +67,16 @@ jobs:
BAKE_META: ${{ steps.bake.outputs.metadata }}
run: |
readarray -t image_refs < <(
jq <<<"${BAKE_META:?}" '
jq <<<"${BAKE_META:?}" -r '
.[]
| select(.["image.name"]? and .["containerimage.digest"]?)
| "\(.["image.name"])@\(.["containerimage.digest"])"
| (.["containerimage.digest"]) as $containerimage_digest
| (.["image.name"] | split(",")) as $image_names
| $image_names[] | "\(.)@\($containerimage_digest)"
'
)
cosign sign --yes ${image_refs:?}
echo "Images to sign:"
printf ' - %s\n' "${image_refs[@]}"
cosign sign --yes ${image_refs[@]:?}

0 comments on commit 87df374

Please sign in to comment.