diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 95f07c4..7c199e3 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -26,4 +26,10 @@ jobs: run: | cd demo/lambda/src docker build -t ${{ steps.login-ecr.outputs.registry }}/demo-awscd-2024:$GITHUB_SHA -f Dockerfile . - docker push ${{ steps.login-ecr.outputs.registry }}/demo-awscd-2024:$GITHUB_SHA \ No newline at end of file + docker push ${{ steps.login-ecr.outputs.registry }}/demo-awscd-2024:$GITHUB_SHA + + - name: Replace the Docker image tag with Git SHA in deploy.yaml + run: | + export GIT_SHA=$(echo $GITHUB_SHA | cut -c1-8) + sed -i "s/:.*/:$GIT_SHA/" demo/lambda/deployment/deploy.yaml +