fix(ci): Support semantic version tags without 'v' prefix
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m22s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m22s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
This commit is contained in:
@@ -6,6 +6,7 @@ on:
|
|||||||
- '**'
|
- '**'
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
- '[0-9]+.[0-9]+.[0-9]+*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
skip_checks:
|
skip_checks:
|
||||||
@@ -64,7 +65,7 @@ jobs:
|
|||||||
ENV_FILE=".env.testing"
|
ENV_FILE=".env.testing"
|
||||||
TRAEFIK_HOST="testing.${DOMAIN}"
|
TRAEFIK_HOST="testing.${DOMAIN}"
|
||||||
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
|
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
|
||||||
if [[ "$REF" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
if [[ "$REF" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
TARGET="production"
|
TARGET="production"
|
||||||
IMAGE_TAG="$REF"
|
IMAGE_TAG="$REF"
|
||||||
ENV_FILE=".env.prod"
|
ENV_FILE=".env.prod"
|
||||||
@@ -113,7 +114,12 @@ jobs:
|
|||||||
echo "🔎 Checking for @mintel dependencies in package.json..."
|
echo "🔎 Checking for @mintel dependencies in package.json..."
|
||||||
# Extract any @mintel/ version (they should be synced in monorepo)
|
# Extract any @mintel/ version (they should be synced in monorepo)
|
||||||
UPSTREAM_VERSION=$(grep -o '"@mintel/.*": "[^"]*"' package.json | grep -v "next-utils" | cut -d'"' -f4 | sed 's/\^//; s/\~//' | sort -V | tail -1)
|
UPSTREAM_VERSION=$(grep -o '"@mintel/.*": "[^"]*"' package.json | grep -v "next-utils" | cut -d'"' -f4 | sed 's/\^//; s/\~//' | sort -V | tail -1)
|
||||||
TAG_TO_WAIT="v$UPSTREAM_VERSION"
|
# Ensure version starts with 'v' for ls-remote check if it doesn't already
|
||||||
|
if [[ "$UPSTREAM_VERSION" =~ ^[0-9] ]]; then
|
||||||
|
TAG_TO_WAIT="v$UPSTREAM_VERSION"
|
||||||
|
else
|
||||||
|
TAG_TO_WAIT="$UPSTREAM_VERSION"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n "$UPSTREAM_VERSION" && "$UPSTREAM_VERSION" != "workspace:"* ]]; then
|
if [[ -n "$UPSTREAM_VERSION" && "$UPSTREAM_VERSION" != "workspace:"* ]]; then
|
||||||
# 1. Discovery (Works without token for public repositories)
|
# 1. Discovery (Works without token for public repositories)
|
||||||
|
|||||||
Reference in New Issue
Block a user