Skip to content

Commit 71db62b

Browse files
committed
add option to inspect the image
1 parent 07d398a commit 71db62b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,15 @@ runs:
210210
echo '```' >> $GITHUB_STEP_SUMMARY
211211
212212
- name: Docker Inspect
213-
id: get-metadata
213+
id: inspect
214214
if: ${{ inputs.inspect }} == 'true'
215215
shell: bash
216216
run: |
217-
docker pull docker inspect "${{ inputs.registry }}/${{ steps.image_name.outputs.image_name }}:${{ steps.tag.outputs.output }}
217+
docker pull "${{ inputs.registry }}/${{ steps.image_name.outputs.image_name }}:${{ steps.tag.outputs.output }}
218+
docker inspect "${{ inputs.registry }}/${{ steps.image_name.outputs.image_name }}:${{ steps.tag.outputs.output }}" > inspect.json
219+
metadata=$(jq -c < inspect.json)
220+
echo "metadata=$metadata" >> $GITHUB_OUTPUT
218221
echo "## Docker Image Inspect" >> $GITHUB_STEP_SUMMARY
219222
echo '```json' >> $GITHUB_STEP_SUMMARY
220-
docker inspect "${{ inputs.registry }}/${{ steps.image_name.outputs.image_name }}:${{ steps.tag.outputs.output }}" >> $GITHUB_STEP_SUMMARY
223+
cat inspect.json >> $GITHUB_STEP_SUMMARY
221224
echo '```' >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)