Skip to content

Commit be53cc7

Browse files
(CAT-2092) - Add workflow restarter
1 parent 29f141c commit be53cc7

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,19 @@ jobs:
7777
- name: Run tests
7878
run: |
7979
bundle exec rake spec
80+
81+
on-failure-workflow-restarter-proxy:
82+
needs: [linux_tests, windows_tests]
83+
if: always() && needs.linux_tests.result == 'failure' || needs.windows_tests.result == 'failure'
84+
runs-on: ubuntu-latest
85+
steps:
86+
- name: Checkout repository
87+
uses: actions/checkout@v4
88+
89+
- name: Trigger reusable workflow
90+
uses: "puppetlabs/cat-github-actions/.github/actions/workflow-restarter-proxy"
91+
env:
92+
SOURCE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
with:
94+
repository: ${{ github.repository }}
95+
run_id: ${{ github.run_id }}

.github/workflows/nightly.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,22 @@ jobs:
7575
- name: Run tests
7676
run: |
7777
bundle exec rake spec
78+
79+
on-failure-workflow-restarter-proxy:
80+
# (1) run this job after the "acceptance" job and...
81+
needs: [linux_tests, windows_tests]
82+
# (2) continue ONLY IF "acceptance" fails
83+
if: always() && needs.linux_tests.result == 'failure' || needs.windows_tests.result == 'failure'
84+
runs-on: ubuntu-latest
85+
steps:
86+
- name: Checkout repository
87+
uses: actions/checkout@v4
88+
89+
- name: Trigger reusable workflow
90+
uses: "puppetlabs/cat-github-actions/.github/actions/workflow-restarter-proxy"
91+
env:
92+
SOURCE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
with:
94+
repository: ${{ github.repository }}
95+
run_id: ${{ github.run_id }}
96+

0 commit comments

Comments
 (0)