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
|
||||
shell: bash
|
||||
run: |
|
||||
RAW_REF="${{ github.ref }}"
|
||||
REF="${RAW_REF#refs/heads/}"
|
||||
REF="${REF#refs/tags/}"
|
||||
REF="$GITHUB_REF_NAME"
|
||||
if [ -z "$REF" ]; then
|
||||
REF=$(git rev-parse --abbrev-ref HEAD | sed 's/HEAD//')
|
||||
fi
|
||||
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
|
||||
DOMAIN="e-tib.com"
|
||||
PRJ="etib"
|
||||
@@ -96,7 +97,7 @@ jobs:
|
||||
IMAGE_TAG="main-${SHORT_SHA}"
|
||||
ENV_FILE=".env.staging"
|
||||
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
|
||||
TARGET="production"
|
||||
IMAGE_TAG="$REF"
|
||||
|
||||
Reference in New Issue
Block a user