Skip to content

Commit dc3d6b9

Browse files
committed
fix VulnScan workflow
1 parent f198c78 commit dc3d6b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/vulncheck.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
with:
3030
persist-credentials: false
3131
fetch-depth: 0
32-
ref: ${{ inputs.target-branch || 'main' }}
32+
# Prioritise inputs.target-branch, defaulting to PR head or current ref before falling back to 'main'.
33+
# Fixes default branch resolution issues observed during Go version upgrades.
34+
ref: ${{ inputs.target-branch || github.head_ref || github.ref_name || 'main' }}
3335

3436
- name: Check Go version
3537
id: get-go-version

0 commit comments

Comments
 (0)