fix(ci): use GITHUB_REF_NAME instead of template string to fix gitea empty string bug
Some checks failed
Build & Deploy / 🔍 Prepare (push) Failing after 3s
Build & Deploy / 🧪 QA (push) Has been skipped
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Failing after 3s
Build & Deploy / 🧪 QA (push) Has been skipped
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
This commit is contained in:
@@ -84,9 +84,10 @@ jobs:
|
|||||||
id: determine
|
id: determine
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
RAW_REF="${{ github.ref }}"
|
REF="$GITHUB_REF_NAME"
|
||||||
REF="${RAW_REF#refs/heads/}"
|
if [ -z "$REF" ]; then
|
||||||
REF="${REF#refs/tags/}"
|
REF=$(git rev-parse --abbrev-ref HEAD | sed 's/HEAD//')
|
||||||
|
fi
|
||||||
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||||
DOMAIN="e-tib.com"
|
DOMAIN="e-tib.com"
|
||||||
PRJ="etib"
|
PRJ="etib"
|
||||||
@@ -96,7 +97,7 @@ jobs:
|
|||||||
IMAGE_TAG="main-${SHORT_SHA}"
|
IMAGE_TAG="main-${SHORT_SHA}"
|
||||||
ENV_FILE=".env.staging"
|
ENV_FILE=".env.staging"
|
||||||
TRAEFIK_HOST="staging.${DOMAIN}"
|
TRAEFIK_HOST="staging.${DOMAIN}"
|
||||||
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
|
elif [[ "$GITHUB_REF" == refs/tags/* ]]; 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"
|
||||||
|
|||||||
Reference in New Issue
Block a user