From 85484fd21269fc2d496bb03c5604ff82489c83ed Mon Sep 17 00:00:00 2001 From: karthikeyannhs <174426205+Karthikeyannhs@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:18:26 +0000 Subject: [PATCH 1/5] fix - dev-tag mismatch issue during deployment --- .github/workflows/base-deploy.yml | 18 +++++++++--------- .github/workflows/cicd-2-publish.yaml | 2 +- .github/workflows/cicd-3-test-deploy.yaml | 18 ++++++++---------- 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/base-deploy.yml b/.github/workflows/base-deploy.yml index fc56410aa..ffe722fa5 100644 --- a/.github/workflows/base-deploy.yml +++ b/.github/workflows/base-deploy.yml @@ -81,15 +81,15 @@ jobs: - name: "Resolve the dev-* tag for this commit" id: tag run: | - git fetch --tags --force - SHA="${{ github.event.workflow_run.head_sha }}" - TAG=$(git tag --points-at "$SHA" | grep '^dev-' | head -n1 || true) - if [ -z "$TAG" ]; then - echo "Using the dev tag provided in the input field" >&2 - TAG="${{ inputs.ref }}" - fi - echo "name=$TAG" >> $GITHUB_OUTPUT - echo "Resolved tag: $TAG" + # 1. Get the full SHA of whatever ref we are on + FULL_SHA=$(git rev-parse HEAD) + # 2. Derive the Short SHA (consistent with Dev/Test) + SHORT_SHA=$(echo $FULL_SHA | cut -c1-7) + + # 3. Define the artifact name to look for + # This matches the 'dev-SHORT_SHA' format + echo "name=dev-$SHORT_SHA" >> $GITHUB_OUTPUT + echo "Resolved artifact lookup tag: dev-$SHORT_SHA" - name: "Resolve promoted environment" id: promoted_env diff --git a/.github/workflows/cicd-2-publish.yaml b/.github/workflows/cicd-2-publish.yaml index f3f0ad688..d20bcced3 100644 --- a/.github/workflows/cicd-2-publish.yaml +++ b/.github/workflows/cicd-2-publish.yaml @@ -44,7 +44,7 @@ jobs: echo "nodejs_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT - echo "version=dev-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT + echo "version=dev-$SHORT_SHA" >> $GITHUB_OUTPUT - name: "List variables" run: | diff --git a/.github/workflows/cicd-3-test-deploy.yaml b/.github/workflows/cicd-3-test-deploy.yaml index cbff54241..8f9813885 100644 --- a/.github/workflows/cicd-3-test-deploy.yaml +++ b/.github/workflows/cicd-3-test-deploy.yaml @@ -33,18 +33,16 @@ jobs: run: | echo "terraform_version=$(grep '^terraform' .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT - - name: "Resolve the dev-* tag for this commit" + - name: "Resolve version from SHA" id: tag run: | - git fetch --tags --force - SHA="${{ github.event.workflow_run.head_sha }}" - TAG=$(git tag --points-at "$SHA" | grep '^dev-' | head -n1 || true) - if [ -z "$TAG" ]; then - echo "No dev-* tag found on $SHA" >&2 - exit 1 - fi - echo "name=$TAG" >> $GITHUB_OUTPUT - echo "Resolved tag: $TAG" + # Get the full SHA from the triggering run + FULL_SHA="${{ github.event.workflow_run.head_sha }}" + # Cut it to 7 characters (standard short SHA) + SHORT_SHA=$(echo $FULL_SHA | cut -c1-7) + + echo "name=dev-$SHORT_SHA" >> $GITHUB_OUTPUT + echo "Resolved version name: dev-$SHORT_SHA" deploy: name: "Deploy to TEST (approval required)" From 251980b31a5fee8ed001864b39369e9ed867369b Mon Sep 17 00:00:00 2001 From: karthikeyannhs <174426205+Karthikeyannhs@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:19:00 +0000 Subject: [PATCH 2/5] test - fix/workflow-dev-tag-issue on push --- .github/workflows/cicd-2-publish.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cicd-2-publish.yaml b/.github/workflows/cicd-2-publish.yaml index d20bcced3..cf80c0c9a 100644 --- a/.github/workflows/cicd-2-publish.yaml +++ b/.github/workflows/cicd-2-publish.yaml @@ -9,6 +9,7 @@ on: branches: - main - hotfix/* + - fix/workflow-dev-tag-issue workflow_dispatch: {} concurrency: From 81a3f06ed96fefc48992e7df4dcb98a65360a3ce Mon Sep 17 00:00:00 2001 From: karthikeyannhs <174426205+Karthikeyannhs@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:30:36 +0000 Subject: [PATCH 3/5] test - fix/workflow-dev-tag-issue on push --- .github/workflows/cicd-2-publish.yaml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cicd-2-publish.yaml b/.github/workflows/cicd-2-publish.yaml index cf80c0c9a..bd5bdb87e 100644 --- a/.github/workflows/cicd-2-publish.yaml +++ b/.github/workflows/cicd-2-publish.yaml @@ -45,6 +45,7 @@ jobs: echo "nodejs_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT + SHORT_SHA=$(git rev-parse HEAD | cut -c1-7) echo "version=dev-$SHORT_SHA" >> $GITHUB_OUTPUT - name: "List variables" @@ -127,17 +128,17 @@ jobs: git tag ${{ needs.metadata.outputs.version }} git push origin ${{ needs.metadata.outputs.version }} - - name: "Notify Slack on PR merge" - uses: slackapi/slack-github-action@v2.1.1 - with: - webhook: ${{ secrets.SLACK_WEBHOOK_URL }} - webhook-type: webhook-trigger - payload: | - status: "${{ job.status }}" - link: "https://github.com/${{ github.repository }}/commit/${{ github.sha }}" - Author: "${{ github.actor }}" - title: "Pushed to main" - version: "${{ needs.metadata.outputs.version }}" +# - name: "Notify Slack on PR merge" +# uses: slackapi/slack-github-action@v2.1.1 +# with: +# webhook: ${{ secrets.SLACK_WEBHOOK_URL }} +# webhook-type: webhook-trigger +# payload: | +# status: "${{ job.status }}" +# link: "https://github.com/${{ github.repository }}/commit/${{ github.sha }}" +# Author: "${{ github.actor }}" +# title: "Pushed to main" +# version: "${{ needs.metadata.outputs.version }}" regression-tests: name: "Regression Tests" From d153e80c765676c996344b3991f6ef8e3c49686d Mon Sep 17 00:00:00 2001 From: karthikeyannhs <174426205+Karthikeyannhs@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:35:50 +0000 Subject: [PATCH 4/5] test - fix/workflow-dev-tag-issue on push --- .github/workflows/base-deploy.yml | 13 ++++--------- .github/workflows/cicd-2-publish.yaml | 4 ++-- .github/workflows/cicd-3-test-deploy.yaml | 7 ++----- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/base-deploy.yml b/.github/workflows/base-deploy.yml index ffe722fa5..7403d3abb 100644 --- a/.github/workflows/base-deploy.yml +++ b/.github/workflows/base-deploy.yml @@ -81,15 +81,10 @@ jobs: - name: "Resolve the dev-* tag for this commit" id: tag run: | - # 1. Get the full SHA of whatever ref we are on - FULL_SHA=$(git rev-parse HEAD) - # 2. Derive the Short SHA (consistent with Dev/Test) - SHORT_SHA=$(echo $FULL_SHA | cut -c1-7) - - # 3. Define the artifact name to look for - # This matches the 'dev-SHORT_SHA' format - echo "name=dev-$SHORT_SHA" >> $GITHUB_OUTPUT - echo "Resolved artifact lookup tag: dev-$SHORT_SHA" + # Get the full SHA from the triggering run + FULL_SHA="${{ github.event.workflow_run.head_sha }}" + echo "name=dev-$FULL_SHA" >> $GITHUB_OUTPUT + echo "Resolved version name: dev-$FULL_SHA" - name: "Resolve promoted environment" id: promoted_env diff --git a/.github/workflows/cicd-2-publish.yaml b/.github/workflows/cicd-2-publish.yaml index bd5bdb87e..f51b7a876 100644 --- a/.github/workflows/cicd-2-publish.yaml +++ b/.github/workflows/cicd-2-publish.yaml @@ -45,8 +45,8 @@ jobs: echo "nodejs_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT - SHORT_SHA=$(git rev-parse HEAD | cut -c1-7) - echo "version=dev-$SHORT_SHA" >> $GITHUB_OUTPUT + FULL_SHA="${{ github.sha }}" + echo "version=dev-$FULL_SHA" >> $GITHUB_OUTPUT - name: "List variables" run: | diff --git a/.github/workflows/cicd-3-test-deploy.yaml b/.github/workflows/cicd-3-test-deploy.yaml index 8f9813885..305e80e9e 100644 --- a/.github/workflows/cicd-3-test-deploy.yaml +++ b/.github/workflows/cicd-3-test-deploy.yaml @@ -38,11 +38,8 @@ jobs: run: | # Get the full SHA from the triggering run FULL_SHA="${{ github.event.workflow_run.head_sha }}" - # Cut it to 7 characters (standard short SHA) - SHORT_SHA=$(echo $FULL_SHA | cut -c1-7) - - echo "name=dev-$SHORT_SHA" >> $GITHUB_OUTPUT - echo "Resolved version name: dev-$SHORT_SHA" + echo "name=dev-$FULL_SHA" >> $GITHUB_OUTPUT + echo "Resolved version name: dev-$FULL_SHA" deploy: name: "Deploy to TEST (approval required)" From 2968dc6c71a4e99f98c0ad5361addf84fdc858de Mon Sep 17 00:00:00 2001 From: karthikeyannhs <174426205+Karthikeyannhs@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:01:30 +0000 Subject: [PATCH 5/5] test - fix/workflow-dev-tag-issue on push --- .github/workflows/cicd-2-publish.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cicd-2-publish.yaml b/.github/workflows/cicd-2-publish.yaml index f51b7a876..04ed5ed9f 100644 --- a/.github/workflows/cicd-2-publish.yaml +++ b/.github/workflows/cicd-2-publish.yaml @@ -128,17 +128,17 @@ jobs: git tag ${{ needs.metadata.outputs.version }} git push origin ${{ needs.metadata.outputs.version }} -# - name: "Notify Slack on PR merge" -# uses: slackapi/slack-github-action@v2.1.1 -# with: -# webhook: ${{ secrets.SLACK_WEBHOOK_URL }} -# webhook-type: webhook-trigger -# payload: | -# status: "${{ job.status }}" -# link: "https://github.com/${{ github.repository }}/commit/${{ github.sha }}" -# Author: "${{ github.actor }}" -# title: "Pushed to main" -# version: "${{ needs.metadata.outputs.version }}" + - name: "Notify Slack on PR merge" + uses: slackapi/slack-github-action@v2.1.1 + with: + webhook: ${{ secrets.SLACK_WEBHOOK_URL }} + webhook-type: webhook-trigger + payload: | + status: "${{ job.status }}" + link: "https://github.com/${{ github.repository }}/commit/${{ github.sha }}" + Author: "${{ github.actor }}" + title: "Pushed to main" + version: "${{ needs.metadata.outputs.version }}" regression-tests: name: "Regression Tests"