nightly #646
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "nightly" | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
workflow_dispatch: | |
jobs: | |
Spec: | |
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main" | |
secrets: "inherit" | |
Acceptance: | |
needs: Spec | |
uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" | |
secrets: "inherit" | |
on-failure-workflow-restarter-proxy: | |
# (1) run this job after the "acceptance" job and... | |
needs: [Acceptance, Spec] | |
# (2) continue ONLY IF "acceptance" fails | |
if: always() && needs.Acceptance.result == 'failure' || needs.Spec.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 | |
- name: Trigger reusable workflow | |
uses: "puppetlabs/cat-github-actions/.github/actions/workflow-restarter-proxy@main" | |
env: | |
SOURCE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
repository: ${{ github.repository }} | |
run_id: ${{ github.run_id }} |