diff --git a/action.yml b/action.yml index 626060b..eac3ba5 100644 --- a/action.yml +++ b/action.yml @@ -86,7 +86,7 @@ outputs: value: ${{ steps.preparation.outputs.tag }} docker-digest: description: 'Docker digest' - value: ${{ steps.docker_build.outputs.digest }} + value: ${{ steps.docker_build.outputs.digest || steps.docker_retag.outputs.digest }} runs: using: "composite" @@ -213,6 +213,10 @@ runs: curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u '${{ inputs.docker-username }}:${{ inputs.docker-password }}' -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${{ inputs.docker-image}}/manifests/${{ steps.preparation.outputs.tag }}" curl --fail-with-body -X PUT -H "Content-Type: ${CONTENT_TYPE}" -u '${{ inputs.docker-username }}:${{ inputs.docker-password }}' -d "${MANIFEST}" "${{ inputs.docker-registry-api }}${{ inputs.docker-image}}/manifests/${{ steps.preparation.outputs.latest }}" + # Get the digest of the image + DIGEST=$(echo $MANIFEST | jq .config.digest | tr -d '"') + echo "digest=$DIGEST" >> $GITHUB_OUTPUT + - name: Checkout GitOps Repository if: inputs.gitops-token != '' uses: actions/checkout@v4