forked from saltstack/salt
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.16 KB
/
check-workflow-run.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
name: Check Workflow Run
run-name: "Check Workflow Run(id: ${{ github.event.workflow_run.id }}; attempt: ${{ github.event.workflow_run.run_attempt }}) - ${{ github.event.workflow_run.display_title }}"
on:
workflow_run:
types:
- completed
workflows:
- CI
- Nightly
- Scheduled
- Stage Release
permissions:
actions: write # So we can re-run workflow runs
jobs:
restart-failed-workflow-runs:
name: "Restart Workflow (id: ${{ github.event.workflow_run.id }}; attempt: ${{ github.event.workflow_run.run_attempt }})"
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
id: setup-python
with:
python-version: "3.10"
- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
- name: Pretty Print The GH Actions Event
run:
tools ci print-gh-event
- name: Restart Workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tools ci rerun-workflow