Skip to content

Commit

Permalink
Merge pull request #14 from ditkrg/dev
Browse files Browse the repository at this point in the history
Fix empty tag output
  • Loading branch information
5h4k4r authored Mar 6, 2024
2 parents 2ae1358 + 8282681 commit ec4d5b9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inputs:
outputs:
tag:
description: "Image Tag"
value: ${{ steps.meta.outputs.tags[0] }}
value: ${{ steps.set_tag.outputs.tag }}
tags:
description: "Image Tags"
value: ${{ steps.meta.outputs.tags }}
Expand Down Expand Up @@ -75,3 +75,15 @@ runs:
cache-from: type=registry,ref=${{ inputs.registry }}/${{ inputs.image }}:${{ github.ref_name }}-cache
build-args: ${{ inputs.build-args }}
secrets: ${{ inputs.build-secrets }}

- name: Set Tag
id: set_tag
shell: bash
run: |
extracted_tag=$(echo "$json" | jq -r '.tags | .[0]')
echo "tag=$extracted_tag" >> $GITHUB_OUTPUT
env:
tags: ${{ steps.meta.outputs.tags }}
json: ${{ steps.meta.outputs.json }}

0 comments on commit ec4d5b9

Please sign in to comment.