Skip to content

Commit

Permalink
feat: add an output for the tag suffix
Browse files Browse the repository at this point in the history
This allows us to avoid using the DOCKER_REPO secret in the output.
  • Loading branch information
paulswartz committed Jun 11, 2024
1 parent 6aca02e commit 27cea46
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build-push-ecr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ outputs:
docker-tag:
description: Docker Tag
value: ${{ steps.docker.outputs.tag }}
docker-tag-suffix:
description: Docker Tag Suffix (the part after the :)
value: ${{ steps.docker.outputs.tag-suffix }}
runs:
using: composite
steps:
Expand All @@ -36,7 +39,10 @@ runs:
role-to-assume: ${{ inputs.role-to-assume }}
aws-region: ${{ inputs.aws-region }}
mask-aws-account-id: true
- run: echo "tag=${{ inputs.docker-repo }}:git-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- run: |
short_sha=$(git rev-parse --short HEAD)
echo "tag=${{ inputs.docker-repo }}:git-${short_sha}" >> $GITHUB_OUTPUT
echo "tag-suffix=git-${short_sha}" >> $GITHUB_OUTPUT
id: docker
shell: bash
- run: >
Expand Down

0 comments on commit 27cea46

Please sign in to comment.