From 3c4d6b1884d6a9427b18114f10a7ba45fd8f36a8 Mon Sep 17 00:00:00 2001 From: Sam Seed Date: Tue, 10 Oct 2023 10:06:23 +0100 Subject: [PATCH] Go back to using github.sha for tag everywhere --- .github/workflows/aws_deploy.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/aws_deploy.yml b/.github/workflows/aws_deploy.yml index 09cc23990..507ea9d7f 100644 --- a/.github/workflows/aws_deploy.yml +++ b/.github/workflows/aws_deploy.yml @@ -86,23 +86,15 @@ jobs: id: timestamp run: echo "timestamp=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV - - name: Checkout at release tag - uses: actions/checkout@v3 - if: inputs.environment == 'production' - with: - ref: ${{ inputs.release_tag }} - - - name: Get tags - id: tags + - name: Get additional tag run: | - echo "commit-tag=$(if [[ ${{ inputs.environment }} == 'production' ]]; then echo $(git log -1 '--format=format:%H'); else echo ${{ github.sha }}; fi)" >> $GITHUB_ENV echo "additional-tag=$(if [[ ${{ inputs.environment }} == 'production' ]]; then echo ${{ inputs.release_tag }}-${{ env.timestamp }}; else echo ${{ env.timestamp }}; fi)" >> $GITHUB_ENV - name: Add environment tag to existing image id: update-image-tags env: registry: ${{ steps.ecr-login.outputs.registry }} - commit_tag: ${{ env.commit-tag }} + commit_tag: ${{ github.sha }} readable_tag: ${{ inputs.environment }}-${{ env.additional-tag }} run: | manifest=$(aws ecr batch-get-image --repository-name $repository --image-ids imageTag=$commit_tag --output text --query images[].imageManifest)