Skip to content

Commit 2303e30

Browse files
committed
Fix ci workflow on master
The ci workflow got broken in 3698755 because `dorny/paths-filter` action works out of the box on PR runs only. It can be made to work on branch push runs too (requires actions/checkout), but then it's meaningless -- there won't be any chnages anyway. Or actually can be misleading, as it will compare the branch against master, so may work surprisingly when the workflow is enabled on any other branch.
1 parent 9945c9a commit 2303e30

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ jobs:
5555
steps:
5656
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
5757
id: filter
58+
if: github.event_name == 'pull_request'
5859
with:
60+
# Note: `docs` output is currently unused. The docs changes are tested by maven-checks job, leveraging GIB impact analysis.
61+
# TODO remove use of non_docs filters and remove `path-filters` job. Use GIB impact analysis to guard job skipping.
5962
filters: |
6063
docs: 'docs/**'
6164
non_docs: '!docs/**'
@@ -100,7 +103,7 @@ jobs:
100103

101104
artifact-checks:
102105
needs: path-filters
103-
if: needs.path-filters.outputs.non_docs == 'true'
106+
if: github.event_name != 'pull_request' || needs.path-filters.outputs.non_docs == 'true'
104107
runs-on: ubuntu-latest
105108
timeout-minutes: 45
106109
steps:
@@ -189,7 +192,7 @@ jobs:
189192

190193
error-prone-checks:
191194
needs: path-filters
192-
if: needs.path-filters.outputs.non_docs == 'true'
195+
if: github.event_name != 'pull_request' || needs.path-filters.outputs.non_docs == 'true'
193196
runs-on: ubuntu-latest
194197
timeout-minutes: 45
195198
steps:
@@ -219,7 +222,7 @@ jobs:
219222
220223
test-jdbc-compatibility:
221224
needs: path-filters
222-
if: needs.path-filters.outputs.non_docs == 'true'
225+
if: github.event_name != 'pull_request' || needs.path-filters.outputs.non_docs == 'true'
223226
runs-on: ubuntu-latest
224227
timeout-minutes: 30
225228
steps:
@@ -261,7 +264,7 @@ jobs:
261264

262265
hive-tests:
263266
needs: path-filters
264-
if: needs.path-filters.outputs.non_docs == 'true'
267+
if: github.event_name != 'pull_request' || needs.path-filters.outputs.non_docs == 'true'
265268
runs-on: ubuntu-latest
266269
strategy:
267270
fail-fast: false
@@ -319,7 +322,7 @@ jobs:
319322

320323
test-other-modules:
321324
needs: path-filters
322-
if: needs.path-filters.outputs.non_docs == 'true'
325+
if: github.event_name != 'pull_request' || needs.path-filters.outputs.non_docs == 'true'
323326
runs-on: ubuntu-latest
324327
timeout-minutes: 60
325328
steps:
@@ -408,7 +411,7 @@ jobs:
408411

409412
build-test-matrix:
410413
needs: path-filters
411-
if: needs.path-filters.outputs.non_docs == 'true'
414+
if: github.event_name != 'pull_request' || needs.path-filters.outputs.non_docs == 'true'
412415
runs-on: ubuntu-latest
413416
outputs:
414417
matrix: ${{ steps.set-matrix.outputs.matrix }}
@@ -833,7 +836,7 @@ jobs:
833836

834837
build-pt:
835838
needs: path-filters
836-
if: needs.path-filters.outputs.non_docs == 'true'
839+
if: github.event_name != 'pull_request' || needs.path-filters.outputs.non_docs == 'true'
837840
runs-on: ubuntu-latest
838841
outputs:
839842
matrix: ${{ steps.set-matrix.outputs.matrix }}

0 commit comments

Comments
 (0)