Skip to content

Commit

Permalink
debug: show metadata from build
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
  • Loading branch information
fzipi committed Feb 12, 2024
1 parent 6351e96 commit da7e188
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ jobs:

- name: Sign the images with GitHub OIDC Token
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
TAGS: ${{ steps.build-and-push.outputs.tags }}
METADATA: ${{ steps.build-and-push.outputs.metadata }}
run: |
DIGEST=$(echo ${METADATA} | jq -r '.digest')
TAGS=$(echo ${METADATA} | jq -r '.tags[]')
images=""
for tag in ${TAGS}; do
images+="${tag}@${DIGEST} "
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/verifyimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:

- name: Build images
uses: docker/bake-action@v4.1.0
id: build
with:
files: |
./docker-bake.hcl
Expand All @@ -64,3 +65,11 @@ jobs:
- name: Verify ${{ matrix.target }}
run: |
[ $(docker inspect ${{ matrix.target }}-test --format='{{.State.Running}}') = 'true' ]
- name: Show metadata
env:
METADATA: ${{ steps.build.outputs.metadata }}
run: |
echo PLAIN METADATA: $METADATA
echo JSON METADATA: $(echo $METADATA | jq -r .)

0 comments on commit da7e188

Please sign in to comment.