From d93d01c4521dedc73375d0325469af71e18dbfd4 Mon Sep 17 00:00:00 2001 From: timam Date: Thu, 16 May 2024 22:12:21 +0600 Subject: [PATCH] test update sha --- .github/workflows/deploy.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 +