-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 1.27 KB
/
retry_perf.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
name: Rerun failed workflows
on:
workflow_dispatch:
# schedule:
# - cron: '*/5 * * * *' # GMT time, 21:03 GMT == 06:03 China
push:
branches:
- main
jobs:
rerun_llm_perf_nightly_test:
runs-on: ubuntu-latest
steps:
- name: Get run_id
run: |
echo "${{ (github.event.schedule && true) || false }}"
# curl -o workspaces.json \
# -H "Accept: application/vnd.github.v3+json" \
# -H "Authorization: token ${{ secrets.ACTIONS_PAT }}" \
# https://api.github.com/repos/intel-analytics/BigDL/actions/workflows/llm_performance_tests.yml/runs
# run_id=`cat workspaces.json | jq --arg today $(date -u +%Y-%m-%d) '.workflow_runs[] | if .event == "schedule" and .status == "completed" and .created_at[:10] == $today then .id else null end | values'`
# echo $run_id
# echo "RUN_ID=$run_id" >> $GITHUB_ENV
# rm -f workspaces.json
# - name: rerun failed workflow
# uses: octokit/request-action@v2.x
# if: ${{ env.RUN_ID }}
# with:
# route: POST /repos/intel-analytics/BigDL/actions/runs/{run_id}/rerun-failed-jobs
# run_id: ${{ env.RUN_ID }}
# env:
# GITHUB_TOKEN: ${{ secrets.ACTIONS_PAT }}