Skip to content

Commit

Permalink
feat: code changes to return image digest as output (#36)
Browse files Browse the repository at this point in the history
* feat: code changes to return image digest as output

* fix: remove interpolation from description.
  • Loading branch information
mishraomp authored Oct 25, 2023
1 parent f716b05 commit 6483d2e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ inputs:
default: ${{ github.token }}

outputs:
build:
description: True if a build has been generated
value: ${{ steps.build.outputs.triggered }}
digest:
description: 'Digest of the built image. for ex: sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef'
value: ${{ steps.get_digest.outputs.digest }}

runs:
using: composite
Expand Down Expand Up @@ -182,3 +182,10 @@ runs:
- name: Checkout local repo to make sure action.yml is present
if: ${{ github.repository }} != ${{ inputs.repository }}
uses: actions/checkout@v4

- name: Return digest of the built image
id: get_digest
shell: bash
run: |
DIGEST=$(docker manifest inspect ${{ steps.vars.outputs.tags }} | jq '.manifests[0].digest')
echo "digest=${DIGEST}" >> $GITHUB_OUTPUT

0 comments on commit 6483d2e

Please sign in to comment.