Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
danadoherty639 committed Sep 5, 2024
1 parent 12f1755 commit 9ffeb07
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,26 @@ jobs:
puppet_version: ${{ matrix.puppet_gem_version }}
rake_task: 'acceptance:local'
runs_on: ${{ matrix.os }}

on-failure-workflow-restarter-proxy:
# (1) run this job after the "acceptance" job and...
needs: [acceptance]
# (2) continue ONLY IF "acceptance" fails
if: always() && needs.acceptance.result == 'failure'
runs-on: ubuntu-latest
steps:
# (3) checkout this repository in order to "see" the following custom action
- name: Checkout repository
uses: actions/checkout@v4

# (4) "use" the custom action to retrigger the failed "acceptance job" above
# NOTE: pass the SOURCE_GITHUB_TOKEN to the custom action because (a) it must have
# this to trigger the reusable workflow that restarts the failed job; and
# (b) custom actions do not have access to the calling workflow's secrets
- name: Trigger reusable workflow
uses: "puppetlabs/cat-github-actions/.github/workflows/workflow-restarter.yml@cat_1820"
env:
SOURCE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repository: ${{ github.repository }}
run_id: ${{ github.run_id }}
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
# this to trigger the reusable workflow that restarts the failed job; and
# (b) custom actions do not have access to the calling workflow's secrets
- name: Trigger reusable workflow
uses: "puppetlabs/cat-github-actions/.github/workflows/gem_acceptance.yml@cat_1820"
uses: "puppetlabs/cat-github-actions/.github/workflows/workflow-restarter.yml@cat_1820"
env:
SOURCE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down

0 comments on commit 9ffeb07

Please sign in to comment.