Skip to content

Commit edf1762

Browse files
committed
ci: fix default branch test (#2369)
1 parent 74f492e commit edf1762

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

.github/workflows/build-windows.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ concurrency:
2323
cancel-in-progress: true
2424

2525
env:
26-
GOSEC_VERSION: '2.14.0'
26+
GOSEC_VERSION: '2.15.0'
2727

2828
jobs:
2929
filter:

.github/workflows/build-x86-image.yaml

+17-16
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ jobs:
131131
- uses: actions/checkout@v3
132132

133133
- name: Create the default branch directory
134-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
134+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
135135
run: mkdir -p test/e2e/source
136136

137137
- name: Check out the default branch
138-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
138+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
139139
uses: actions/checkout@v3
140140
with:
141141
ref: ${{ github.event.repository.default_branch }}
@@ -168,6 +168,7 @@ jobs:
168168
restore-keys: ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
169169

170170
- run: make e2e-compile
171+
working-directory: ${{ env.E2E_DIR }}
171172

172173
k8s-conformance-e2e:
173174
name: Kubernetes Conformance E2E
@@ -190,11 +191,11 @@ jobs:
190191
- uses: actions/checkout@v3
191192

192193
- name: Create the default branch directory
193-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
194+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
194195
run: mkdir -p test/e2e/source
195196

196197
- name: Check out the default branch
197-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
198+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
198199
uses: actions/checkout@v3
199200
with:
200201
ref: ${{ github.event.repository.default_branch }}
@@ -282,11 +283,11 @@ jobs:
282283
- uses: actions/checkout@v3
283284

284285
- name: Create the default branch directory
285-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
286+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
286287
run: mkdir -p test/e2e/source
287288

288289
- name: Check out the default branch
289-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
290+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
290291
uses: actions/checkout@v3
291292
with:
292293
ref: ${{ github.event.repository.default_branch }}
@@ -368,11 +369,11 @@ jobs:
368369
- uses: actions/checkout@v3
369370

370371
- name: Create the default branch directory
371-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
372+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
372373
run: mkdir -p test/e2e/source
373374

374375
- name: Check out the default branch
375-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
376+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
376377
uses: actions/checkout@v3
377378
with:
378379
ref: ${{ github.event.repository.default_branch }}
@@ -433,11 +434,11 @@ jobs:
433434
- uses: actions/checkout@v3
434435

435436
- name: Create the default branch directory
436-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
437+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
437438
run: mkdir -p test/e2e/source
438439

439440
- name: Check out the default branch
440-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
441+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
441442
uses: actions/checkout@v3
442443
with:
443444
ref: ${{ github.event.repository.default_branch }}
@@ -514,11 +515,11 @@ jobs:
514515
- uses: actions/checkout@v3
515516

516517
- name: Create the default branch directory
517-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
518+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
518519
run: mkdir -p test/e2e/source
519520

520521
- name: Check out the default branch
521-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
522+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
522523
uses: actions/checkout@v3
523524
with:
524525
ref: ${{ github.event.repository.default_branch }}
@@ -768,11 +769,11 @@ jobs:
768769
version: '${{ env.HELM_VERSION }}'
769770

770771
- name: Create the default branch directory
771-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
772+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
772773
run: mkdir -p test/e2e/source
773774

774775
- name: Check out the default branch
775-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
776+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
776777
uses: actions/checkout@v3
777778
with:
778779
ref: ${{ github.event.repository.default_branch }}
@@ -864,11 +865,11 @@ jobs:
864865
- uses: actions/checkout@v3
865866

866867
- name: Create the default branch directory
867-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
868+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
868869
run: mkdir -p test/e2e/source
869870

870871
- name: Check out the default branch
871-
if: github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
872+
if: (github.base_ref || github.ref_name) != github.event.repository.default_branch
872873
uses: actions/checkout@v3
873874
with:
874875
ref: ${{ github.event.repository.default_branch }}

0 commit comments

Comments
 (0)