Skip to content

Commit 7f91ede

Browse files
committed
chore: handle branch tags
1 parent eeedf93 commit 7f91ede

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/integration-gcp.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: Integration Tests - GCP
1717
on:
1818
workflow_dispatch: {} # allow manual runs for testing
1919
schedule:
20-
- cron: '30 14 * * *' # daily at 14:30 UTC
20+
- cron: '30 14 * * *' # daily at 14:30 UTC, runs on default branch only (aka main)
2121
push:
2222
branches:
2323
- main
@@ -54,6 +54,7 @@ jobs:
5454
TF_VAR_resource_labels: '{"environment":"test","team":"nvsentinel","managed_by":"terraform"}'
5555
# Debug
5656
SKIP_DELETE: "false" # skip cluster deletion
57+
TEST_TAG: "main-33c1d03"
5758

5859
steps:
5960
# Checkout
@@ -109,9 +110,11 @@ jobs:
109110
run: |
110111
if [[ "${{ github.ref_type }}" == "tag" ]]; then
111112
SAFE_REF="${{ github.ref_name }}"
112-
else
113+
else if [[ "${{ github.ref_name }}" == "main" ]]; then
113114
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
114115
SAFE_REF="${{ github.ref_name }}-${SHORT_SHA}"
116+
else
117+
SAFE_REF="${{ env.TEST_TAG }}"
115118
fi
116119
# Sanitize ref name: replace slashes with hyphens for Docker tag compatibility
117120
SAFE_REF=$(echo "$SAFE_REF" | sed 's/\//-/g')

0 commit comments

Comments
 (0)