Skip to content

Commit

Permalink
ci(replicator): use wait-for-jobs instead of max-parallel (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Oct 5, 2023
1 parent 1af62f1 commit 6971b2c
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/global-replicator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:

strategy:
fail-fast: false # false to run all, true to fail entire job if any fail
max-parallel: 1 # jobs fail submitting PRs if run too fast
matrix:
include:
- job_name: 'replicate workflows'
depends_on: ''
patterns_to_ignore: ''
patterns_to_include: >-
.github/dependabot.yml,
Expand All @@ -53,6 +53,7 @@ jobs:
exclude_forked: true
destination: ''
- job_name: 'replicate python'
depends_on: 'replicate workflows'
patterns_to_ignore: ''
patterns_to_include: >-
.flake8,
Expand All @@ -65,6 +66,7 @@ jobs:
exclude_forked: true
destination: ''
- job_name: 'replicate docker'
depends_on: 'replicate python'
patterns_to_ignore: ''
patterns_to_include: >-
.github/workflows/ci-docker.yml
Expand All @@ -76,6 +78,7 @@ jobs:
exclude_forked: true
destination: ''
- job_name: 'replicate cpp'
depends_on: 'replicate docker'
patterns_to_ignore: ''
patterns_to_include: >-
.clang-format,
Expand All @@ -87,7 +90,8 @@ jobs:
exclude_private: false
exclude_forked: true
destination: ''
- job_name: 'custom issues'
- job_name: 'replicate custom issues'
depends_on: 'replicate cpp'
patterns_to_ignore: ''
patterns_to_include: >-
.github/ISSUE_TEMPLATE/config.yml
Expand All @@ -99,6 +103,7 @@ jobs:
exclude_forked: true
destination: ''
- job_name: 'release notifier'
depends_on: 'replicate custom issues'
patterns_to_ignore: ''
patterns_to_include: >-
.github/workflows/release-notifier.yml
Expand All @@ -116,6 +121,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

# replaced max-parallel: 1 with wait-for-jobs to ensure that all jobs are started
# we want all jobs started because once we push to the repos, all runners will be consumed
- name: Wait for previous job
if: ${{ matrix.depends_on != '' }}
uses: yogeshlonkar/wait-for-jobs@v0
with:
jobs: ${{ matrix.depends_on }}

- name: Removing files
if: ${{ matrix.patterns_to_remove != '' }}
uses: derberg/[email protected]
Expand Down

0 comments on commit 6971b2c

Please sign in to comment.