fix(pipeline): use POSIX sh compatible logic for release prioritization
Some checks failed
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 1s
Monorepo Pipeline / 🧹 Lint (push) Successful in 44s
Monorepo Pipeline / 🧪 Test (push) Successful in 40s
Monorepo Pipeline / 🏗️ Build (push) Successful in 1m47s
Monorepo Pipeline / 🚀 Release (push) Has been cancelled
Monorepo Pipeline / 🐳 Build Directus (Base) (push) Has been cancelled
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been cancelled
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been cancelled
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been cancelled

This commit is contained in:
2026-02-11 00:33:06 +01:00
parent d5a9a3bce4
commit 013b0259b2

View File

@@ -29,7 +29,8 @@ jobs:
run: | run: |
echo "🔎 Debug: Event=$EVENT, Ref=$REF, RefName=$REF_NAME, RunId=$RUN_ID" echo "🔎 Debug: Event=$EVENT, Ref=$REF, RefName=$REF_NAME, RunId=$RUN_ID"
if [[ "$REF" == refs/tags/v* ]]; then case "$REF" in
refs/tags/v*)
echo "🚀 Release detected ($REF_NAME). Cancelling non-tag runs..." echo "🚀 Release detected ($REF_NAME). Cancelling non-tag runs..."
# Fetch all runs # Fetch all runs
@@ -41,16 +42,21 @@ jobs:
RUN_REF=$(echo "$run" | jq -r '.ref') RUN_REF=$(echo "$run" | jq -r '.ref')
TITLE=$(echo "$run" | jq -r '.display_title') TITLE=$(echo "$run" | jq -r '.display_title')
if [[ "$RUN_REF" != refs/tags/v* ]]; then case "$RUN_REF" in
refs/tags/v*)
echo "⏭️ Skipping parallel release run $ID ($TITLE) on $RUN_REF"
;;
*)
echo "🛑 Cancelling redundant branch run $ID ($TITLE) on $RUN_REF..." echo "🛑 Cancelling redundant branch run $ID ($TITLE) on $RUN_REF..."
curl -X POST -s -H "Authorization: token $GITEA_TOKEN" "https://git.infra.mintel.me/api/v1/repos/$REPO/actions/runs/$ID/cancel" curl -X POST -s -H "Authorization: token $GITEA_TOKEN" "https://git.infra.mintel.me/api/v1/repos/$REPO/actions/runs/$ID/cancel"
else ;;
echo "⏭️ Skipping parallel release run $ID ($TITLE) on $RUN_REF" esac
fi
done done
else ;;
echo " Regular push. No prioritazation needed." *)
fi echo " Regular push. No prioritization needed."
;;
esac
lint: lint:
name: 🧹 Lint name: 🧹 Lint