From 11e4f8f6e6001599934bf6afae4dae5d7f82b3ad Mon Sep 17 00:00:00 2001 From: Maboh Christopher Date: Wed, 23 Oct 2024 15:04:49 -0400 Subject: [PATCH] update promote workflow --- .github/workflows/promote.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index f167abfff..df203149c 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -51,7 +51,11 @@ jobs: echo "Getting the manifest of the image tagged main-$SHA_SHORT" MANIFEST="$(curl -sS -H "Authorization: Basic $TOKEN" -H "Accept: $CONTENT_TYPE" "https://$ECR_REPO_DOMAIN/v2/$ECR_REPO/manifests/main-$SHA_SHORT")" + if [ "${{ inputs.environment }}" == "prod_test" ]; then + SHA_TAG="ab2d-prod-test-$SHA_SHORT" + else SHA_TAG="ab2d-$DEPLOYMENT_ENV-$SHA_SHORT" + fi echo "Adding the $SHA_TAG tag to main-$SHA_SHORT image" curl -sS -X PUT -H "Authorization: Basic $TOKEN" -H "Content-Type: $CONTENT_TYPE" -d "$MANIFEST" "https://$ECR_REPO_DOMAIN/v2/$ECR_REPO/manifests/$SHA_TAG"