Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .github/workflows/base-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,10 @@ 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"
# 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
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/cicd-2-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
branches:
- main
- hotfix/*
- fix/workflow-dev-tag-issue
workflow_dispatch: {}

concurrency:
Expand Down Expand Up @@ -44,7 +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
echo "version=dev-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
FULL_SHA="${{ github.sha }}"
echo "version=dev-$FULL_SHA" >> $GITHUB_OUTPUT

- name: "List variables"
run: |
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/cicd-3-test-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,13 @@ 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 }}"
echo "name=dev-$FULL_SHA" >> $GITHUB_OUTPUT
echo "Resolved version name: dev-$FULL_SHA"

deploy:
name: "Deploy to TEST (approval required)"
Expand Down
Loading