Skip to content

Commit a357aa0

Browse files
authored
Merge pull request #92 from Raphael-Gazzotti/fix-#90
Fix #90: Pipeline not triggered on pushes to the vocab main/development
2 parents f05c31d + d780020 commit a357aa0

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/build-dev.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name: openMINDS_dev_build_pipeline
44
on:
55
push:
66
branches:
7+
- development
78
- pipeline
89
workflow_dispatch: # This triggers the workflow when a webhook is received
910
inputs:
@@ -18,7 +19,26 @@ on:
1819

1920

2021
jobs:
22+
check_vocab:
23+
runs-on: ubuntu-latest
24+
outputs:
25+
vocab_changed: ${{ steps.filter.outputs.vocab }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: dorny/paths-filter@v3
29+
id: filter
30+
if: github.ref == 'refs/heads/development'
31+
with:
32+
filters: |
33+
vocab:
34+
- 'vocab/**'
35+
2136
build:
37+
needs: check_vocab
38+
if: |
39+
github.ref == 'refs/heads/pipeline' ||
40+
github.event_name == 'workflow_dispatch' ||
41+
(github.ref == 'refs/heads/development' && needs.check_vocab.outputs.vocab_changed == 'true' && github.actor != 'github-actions[bot]')
2242
runs-on: ubuntu-latest
2343
steps:
2444

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name: openMINDS_build_pipeline
44
on:
55
push:
66
branches:
7+
- main
78
- pipeline
89
workflow_dispatch: # This triggers the workflow when a webhook is received
910
inputs:
@@ -18,7 +19,26 @@ on:
1819

1920

2021
jobs:
22+
check_vocab:
23+
runs-on: ubuntu-latest
24+
outputs:
25+
vocab_changed: ${{ steps.filter.outputs.vocab }}
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: dorny/paths-filter@v3
29+
id: filter
30+
if: github.ref == 'refs/heads/main'
31+
with:
32+
filters: |
33+
vocab:
34+
- 'vocab/**'
35+
2136
build:
37+
needs: check_vocab
38+
if: |
39+
github.ref == 'refs/heads/pipeline' ||
40+
github.event_name == 'workflow_dispatch' ||
41+
(github.ref == 'refs/heads/main' && needs.check_vocab.outputs.vocab_changed == 'true' && github.actor != 'github-actions[bot]')
2242
runs-on: ubuntu-latest
2343
steps:
2444

0 commit comments

Comments
 (0)