Skip to content

Commit b11600c

Browse files
Merge pull request #228 from puppetlabs/MAINT-Implement_workflow_restarter
(MAINT) Implementing workflow restarter
2 parents 24763d6 + e551a09 commit b11600c

File tree

2 files changed

+20
-63
lines changed

2 files changed

+20
-63
lines changed

.github/workflows/nightly.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,23 @@ jobs:
1414
needs: Spec
1515
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main"
1616
secrets: "inherit"
17+
18+
on-failure-workflow-restarter-proxy:
19+
# (1) run this job after the "acceptance" job and...
20+
needs: [Acceptance, Spec]
21+
# (2) continue ONLY IF "acceptance" fails
22+
if: always() && needs.Acceptance.result == 'failure' || needs.Spec.result == 'failure'
23+
runs-on: ubuntu-latest
24+
steps:
25+
# (3) checkout this repository in order to "see" the following custom action
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
# (4) "use" the custom action to retrigger the failed "acceptance job" above
30+
- name: Trigger reusable workflow
31+
uses: "puppetlabs/cat-github-actions/.github/actions/workflow-restarter-proxy@main"
32+
env:
33+
SOURCE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
repository: ${{ github.repository }}
36+
run_id: ${{ github.run_id }}

.github/workflows/workflow-restarter-test.yml

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)