Skip to content

Commit 39936e7

Browse files
committed
Substitute branch name with sha.
1 parent 5124a8b commit 39936e7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/crd-validation.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,12 @@ jobs:
3030
3131
- name: Run CRD Validation Check
3232
run: |
33-
BASE_REF="${{ github.base_ref }}"
3433
HEAD_REF="${{ github.head_ref }}"
35-
echo "current branch: $BASE_REF || head: $HEAD_REF"
34+
HEAD_SHA=$(git rev-parse $HEAD_REF)
3635
3736
FAILED=0
3837
for crd in config/crd/bases/*.yaml; do
39-
if ! crdify "git://${BASE_REF}?path=$crd" "git://HEAD?path=$crd"; then
38+
if ! crdify "git://${HEAD_SHA}?path=$crd" "git://HEAD?path=$crd"; then
4039
echo "❌ Incompatible change detected in $crd"
4140
((FAILED++))
4241
else

0 commit comments

Comments
 (0)