Skip to content

Commit 53c7a5f

Browse files
Merge pull request #112 from puppetlabs/maint-fix-readme
(maint) - Update readme
2 parents c184972 + d0f40b5 commit 53c7a5f

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.github/workflows/workflow-restarter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Workflow Restarter
33
on:
4-
workflow_dispatch:
4+
workflow_call:
55
inputs:
66
repo:
77
description: "GitHub repository name."

docs/workflow-restarter.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ on:
3737

3838
jobs:
3939
call-reusable-workflow:
40-
uses: puppetlabs/cat-github-actions/.github/workflows/workflow-restarter.yml@main
40+
uses: "puppetlabs/cat-github-actions/.github/workflows/workflow-restarter.yml@main"
4141
with:
4242
repo: ${{ inputs.repo }}
4343
run_id: ${{ inputs.run_id }}
@@ -55,7 +55,7 @@ Now add something like the following `yaml` job at the end of your workflow, cha
5555
For example, the following will trigger a restart if either the `acceptance` or the `unit` jobs preceeding it fail. A restart of the failing jobs will be attempted 3 times at which point if the failing jobs continue to fail, then the workflow will be marked as failed. If, however, at any point the `acceptance` and `unit` both pass fine then the restarted workflow will be marked as successful
5656

5757
```yaml
58-
on-failure-workflow-restarter-proxy:
58+
on-failure-workflow-restarter-proxy:
5959
# (1) run this job after the "acceptance" job and...
6060
needs: [acceptance, unit]
6161
# (2) continue ONLY IF "acceptance" fails
@@ -64,19 +64,16 @@ For example, the following will trigger a restart if either the `acceptance` or
6464
steps:
6565
# (3) checkout this repository in order to "see" the following custom action
6666
- name: Checkout repository
67-
uses: actions/checkout@v2
67+
uses: actions/checkout@v4
6868
69-
# (4) "use" the custom action to retrigger the failed "acceptance job" above
70-
# NOTE: pass the SOURCE_GITHUB_TOKEN to the custom action because (a) it must have
71-
# this to trigger the reusable workflow that restarts the failed job; and
72-
# (b) custom actions do not have access to the calling workflow's secrets
7369
- name: Trigger reusable workflow
74-
uses: ./.github/actions/workflow-restarter-proxy@main
70+
uses: "puppetlabs/cat-github-actions/.github/actions/workflow-restarter-proxy"
7571
env:
7672
SOURCE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7773
with:
7874
repository: ${{ github.repository }}
7975
run_id: ${{ github.run_id }}
76+
8077
```
8178

8279
## Appendix

0 commit comments

Comments
 (0)