refactor: enforce 'v' prefix for version tags in deploy workflow triggers and logic.
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m46s
Build & Deploy / 🏗️ Build (push) Successful in 7m19s
Build & Deploy / 🚀 Deploy (push) Successful in 27s
Build & Deploy / 🧪 Smoke Test (push) Failing after 1m1s
Build & Deploy / 🔔 Notify (push) Successful in 3s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 1m46s
Build & Deploy / 🏗️ Build (push) Successful in 7m19s
Build & Deploy / 🚀 Deploy (push) Successful in 27s
Build & Deploy / 🧪 Smoke Test (push) Failing after 1m1s
Build & Deploy / 🔔 Notify (push) Successful in 3s
This commit is contained in:
@@ -6,7 +6,6 @@ on:
|
|||||||
- '**'
|
- '**'
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
- '[0-9]+.[0-9]+.[0-9]+*'
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
skip_checks:
|
skip_checks:
|
||||||
@@ -65,7 +64,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"
|
||||||
@@ -114,12 +113,7 @@ 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)
|
||||||
# Ensure version starts with 'v' for ls-remote check if it doesn't already
|
TAG_TO_WAIT="v$UPSTREAM_VERSION"
|
||||||
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