diff --git a/action.yml b/action.yml index 892f1d9..451d839 100644 --- a/action.yml +++ b/action.yml @@ -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 }}