diff --git a/.github/workflows/base-deploy.yml b/.github/workflows/base-deploy.yml index fc56410aa..26a31b4c2 100644 --- a/.github/workflows/base-deploy.yml +++ b/.github/workflows/base-deploy.yml @@ -83,7 +83,7 @@ jobs: run: | git fetch --tags --force SHA="${{ github.event.workflow_run.head_sha }}" - TAG=$(git tag --points-at "$SHA" | grep '^dev-' | head -n1 || true) + TAG=$(git tag --points-at "$SHA" | grep '^dev-' | sort -r | head -n1 || true) if [ -z "$TAG" ]; then echo "Using the dev tag provided in the input field" >&2 TAG="${{ inputs.ref }}" diff --git a/.github/workflows/cicd-3-test-deploy.yaml b/.github/workflows/cicd-3-test-deploy.yaml index cbff54241..46c0c6d81 100644 --- a/.github/workflows/cicd-3-test-deploy.yaml +++ b/.github/workflows/cicd-3-test-deploy.yaml @@ -38,7 +38,7 @@ jobs: run: | git fetch --tags --force SHA="${{ github.event.workflow_run.head_sha }}" - TAG=$(git tag --points-at "$SHA" | grep '^dev-' | head -n1 || true) + TAG=$(git tag --points-at "$SHA" | grep '^dev-' | sort -r | head -n1 || true) if [ -z "$TAG" ]; then echo "No dev-* tag found on $SHA" >&2 exit 1