Merge pull request #14 from ditkrg/dev

Fix empty tag output
This commit is contained in:
Shakar Bakr 2024-03-06 13:42:31 +03:00 committed by GitHub
commit ec4d5b9e24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 }}
@ -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 }}