-
Notifications
You must be signed in to change notification settings - Fork 499
26 lines (24 loc) · 947 Bytes
/
retry.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
name: Rerun tests if failed
on:
workflow_run:
workflows: ["Unit-tests for Conda install", "Unit-tests for Pip install with mypy type checks", "Unit-tests for Pip install"]
types: ["completed"]
permissions:
actions: write
jobs:
rerun-tests:
runs-on: ubuntu-latest
steps:
- name: Log workflow metadata
run: |
echo "ID: ${{ github.event.workflow_run.id }}"
echo "attempt: ${{ github.event.workflow_run.run_attempt }}"
echo "event: ${{ github.event.workflow_run.conclusion }}"
echo "event: ${{ github.event.workflow_run.event }}"
- name: Rerun Failed Workflows
if: github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt <= 3
env:
GH_TOKEN: ${{ github.token }}
RUN_ID: ${{ github.event.workflow_run.id }}
run: |
gh run rerun ${RUN_ID} --repo="${{ github.repository }}" --failed