fix(pipeline): allow all tags and chore commits for releases
All checks were successful
Monorepo Pipeline / ⚡ Prioritize Release (push) Successful in 1s
Monorepo Pipeline / 🧪 Test (push) Successful in 1m5s
Monorepo Pipeline / 🧹 Lint (push) Successful in 2m13s
Monorepo Pipeline / 🏗️ Build (push) Successful in 3m53s
Monorepo Pipeline / 🚀 Release (push) Has been skipped
Monorepo Pipeline / 🐳 Build Directus (Base) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Gatekeeper (Product) (push) Has been skipped
Monorepo Pipeline / 🐳 Build Build-Base (push) Has been skipped
Monorepo Pipeline / 🐳 Build Production Runtime (push) Has been skipped

This commit is contained in:
2026-02-14 13:39:26 +01:00
parent f831a7e67e
commit 169cb83f69
4 changed files with 12 additions and 18 deletions

View File

@@ -5,7 +5,7 @@ on:
branches:
- '**'
tags:
- 'v*'
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
@@ -30,7 +30,7 @@ jobs:
echo "🔎 Debug: Event=$EVENT, Ref=$REF, RefName=$REF_NAME, RunId=$RUN_ID"
case "$REF" in
refs/tags/v*)
refs/tags/*)
echo "🚀 Release detected ($REF_NAME). Cancelling non-tag runs..."
# Fetch all runs
@@ -43,7 +43,7 @@ jobs:
TITLE=$(echo "$run" | jq -r '.display_title')
case "$RUN_REF" in
refs/tags/v*)
refs/tags/*)
echo "⏭️ Skipping parallel release run $ID ($TITLE) on $RUN_REF"
;;
*)
@@ -130,7 +130,7 @@ jobs:
release:
name: 🚀 Release
needs: [lint, test, build]
if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/')
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
@@ -160,7 +160,7 @@ jobs:
build-images:
name: 🐳 Build ${{ matrix.name }}
needs: [lint, test, build]
if: startsWith(github.ref, 'refs/tags/v')
if: startsWith(github.ref, 'refs/tags/')
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest

View File

@@ -8,7 +8,7 @@ fi
# Check if we are pushing a tag
while read local_ref local_sha remote_ref remote_sha
do
if [[ "$remote_ref" == refs/tags/v* ]]; then
if [[ "$remote_ref" == refs/tags/* ]]; then
TAG=${remote_ref#refs/tags/}
echo "🏷️ Tag detected: $TAG, ensuring versions are synced..."

View File

@@ -5,7 +5,7 @@ on:
branches:
- main
tags:
- 'v*'
- '*'
workflow_dispatch:
inputs:
skip_long_checks:
@@ -65,11 +65,6 @@ jobs:
PRJ_ID="${{ github.event.repository.name }}"
if [[ "${{ github.ref_type }}" == "branch" && "$TAG" == "main" ]]; then
if [[ "$COMMIT_MSG" =~ ^chore: ]]; then
TARGET="skip"
GOTIFY_TITLE=" Skip Deploy (Chore)"
GOTIFY_PRIORITY=2
else
TARGET="testing"
IMAGE_TAG="main-${SHORT_SHA}"
ENV_FILE=".env.testing"
@@ -81,9 +76,8 @@ jobs:
IS_PROD="false"
GOTIFY_TITLE="🧪 Testing-Deploy"
GOTIFY_PRIORITY=4
fi
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
if [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
if [[ "$TAG" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
TARGET="production"
IMAGE_TAG="$TAG"
ENV_FILE=".env.prod"

View File

@@ -8,7 +8,7 @@ import { execSync } from "child_process";
*/
function getVersionTag() {
// 0. Check arguments (passed from husky hook or manual run)
const argTag = process.argv.slice(2).find((arg) => arg.startsWith("v"));
const argTag = process.argv.slice(2).find((arg) => arg.match(/^v?\d/));
if (argTag) {
return argTag;
}
@@ -16,11 +16,11 @@ function getVersionTag() {
// 1. Check CI environment variables
if (
process.env.GITHUB_REF_NAME &&
process.env.GITHUB_REF_NAME.startsWith("v")
process.env.GITHUB_REF_NAME.match(/^v?\d/)
) {
return process.env.GITHUB_REF_NAME;
}
if (process.env.TAG && process.env.TAG.startsWith("v")) {
if (process.env.TAG && process.env.TAG.match(/^v?\d/)) {
return process.env.TAG;
}
@@ -29,7 +29,7 @@ function getVersionTag() {
const gitTag = execSync("git describe --tags --abbrev=0", {
encoding: "utf8",
}).trim();
if (gitTag && gitTag.startsWith("v")) {
if (gitTag && gitTag.match(/^v?\d/)) {
return gitTag;
}
} catch (e) {