|
|
@ -86,23 +86,15 @@ jobs: |
|
|
|
id: timestamp |
|
|
|
id: timestamp |
|
|
|
run: echo "timestamp=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV |
|
|
|
run: echo "timestamp=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV |
|
|
|
|
|
|
|
|
|
|
|
- name: Checkout at release tag |
|
|
|
- name: Get additional tag |
|
|
|
uses: actions/checkout@v3 |
|
|
|
|
|
|
|
if: inputs.environment == 'production' |
|
|
|
|
|
|
|
with: |
|
|
|
|
|
|
|
ref: ${{ inputs.release_tag }} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Get tags |
|
|
|
|
|
|
|
id: tags |
|
|
|
|
|
|
|
run: | |
|
|
|
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 |
|
|
|
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 |
|
|
|
- name: Add environment tag to existing image |
|
|
|
id: update-image-tags |
|
|
|
id: update-image-tags |
|
|
|
env: |
|
|
|
env: |
|
|
|
registry: ${{ steps.ecr-login.outputs.registry }} |
|
|
|
registry: ${{ steps.ecr-login.outputs.registry }} |
|
|
|
commit_tag: ${{ env.commit-tag }} |
|
|
|
commit_tag: ${{ github.sha }} |
|
|
|
readable_tag: ${{ inputs.environment }}-${{ env.additional-tag }} |
|
|
|
readable_tag: ${{ inputs.environment }}-${{ env.additional-tag }} |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
manifest=$(aws ecr batch-get-image --repository-name $repository --image-ids imageTag=$commit_tag --output text --query images[].imageManifest) |
|
|
|
manifest=$(aws ecr batch-get-image --repository-name $repository --image-ids imageTag=$commit_tag --output text --query images[].imageManifest) |
|
|
|