Skip to content

Commit

Permalink
Set platform specific digest outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
chainchad committed Feb 15, 2025
1 parent edb6f1a commit 55fc62a
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions actions/build-push-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,12 @@ outputs:
docker-repository-name:
description: "Docker repository name"
value: ${{ inputs.docker-repository-name }}
docker-image-sha-digest:
description: "Docker image SHA digest"
value: ${{ steps.build-image.outputs.digest }}
docker-image-sha-digest-amd64:
description: "Docker image SHA digest for platform: amd64"
value: ${{ steps.set-outputs.outputs.docker-image-sha-digest-amd64 }}
docker-image-sha-digest-arm64:
description: "Docker image SHA digest for platform: amd64"
value: ${{ steps.set-outputs.outputs.docker-image-sha-digest-arm64 }}
docker-image-tags:
description: "Docker image tags"
value: ${{ steps.docker-meta.outputs.tags }}
Expand Down Expand Up @@ -174,3 +177,13 @@ runs:
platforms: ${{ inputs.platform }}
cache-from: ${{ inputs.docker-build-cache-from }}
cache-to: ${{ inputs.docker-build-cache-to }}

- name: Set outputs
id: set-outputs
shell: bash
run: |
if [[ "${INPUT_PLATFORM}" == "linux/amd64" ]]; then
echo "docker-image-sha-digest-amd64=${{ steps.build-image.outputs.digest }}" | tee -a "${GITHUB_OUTPUT}"
elif [[ "${INPUT_PLATFORM}" == "linux/arm64" ]]; then
echo "docker-image-sha-digest-arm64=${{ steps.build-image.outputs.digest }}" | tee -a "${GITHUB_OUTPUT}"
fi

0 comments on commit 55fc62a

Please sign in to comment.