Skip to content

Rerun failed workflows #29

Rerun failed workflows

Rerun failed workflows #29

Workflow file for this run

name: Rerun failed workflows
on:
workflow_dispatch:
schedule:
- cron: "30 13 * * *" # GMT time, 13:30 GMT == 21:30 China
push:
branches:
- main
jobs:
rerun_llm_perf_nightly_test:
runs-on: ubuntu-latest
steps:
- name: Get run_id
run: |
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/[email protected]
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 }}