Skip to content

Commit c1ec31f

Browse files
committed
🎨🔧 Add a check gate to GHA CI/CD workflows
1 parent 552d866 commit c1ec31f

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/ci-cd.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,25 @@ jobs:
211211
cat "${log}"
212212
done
213213
214+
check: # This job does nothing and is only used for the branch protection
215+
if: always()
216+
217+
needs:
218+
- lint
219+
- tests
220+
221+
runs-on: ubuntu-latest
222+
223+
steps:
224+
- name: Decide whether the needed jobs succeeded or failed
225+
uses: re-actors/alls-green@release/v1
226+
with:
227+
jobs: ${{ toJSON(needs) }}
228+
214229
publish:
215230
name: Validate metadata and optionally publish 🐍📦 to PyPI
216231
needs:
217-
- tests
232+
- check
218233
runs-on: ${{ matrix.os }}
219234
strategy:
220235
# NOTE: Even though it's one job, it's easier to keep the params in one

0 commit comments

Comments
 (0)