fix(ci): Support semantic version tags without 'v' prefix
This commit is contained in:
@@ -6,6 +6,7 @@ on:
|
||||
- '**'
|
||||
tags:
|
||||
- 'v*'
|
||||
- '[0-9]+.[0-9]+.[0-9]+*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
skip_checks:
|
||||
@@ -64,7 +65,7 @@ jobs:
|
||||
ENV_FILE=".env.testing"
|
||||
TRAEFIK_HOST="testing.${DOMAIN}"
|
||||
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"
|
||||
IMAGE_TAG="$REF"
|
||||
ENV_FILE=".env.prod"
|
||||
@@ -113,7 +114,12 @@ jobs:
|
||||
echo "🔎 Checking for @mintel dependencies in package.json..."
|
||||
# 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)
|
||||
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
|
||||
# 1. Discovery (Works without token for public repositories)
|
||||
|
||||
Reference in New Issue
Block a user