From 4c6f8a5100fad2efdab30ce2a06621d464c02116 Mon Sep 17 00:00:00 2001 From: Minoplhy Date: Sun, 3 Oct 2021 09:58:39 +0700 Subject: [PATCH] Update tasks.yaml --- .github/workflows/tasks.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/tasks.yaml b/.github/workflows/tasks.yaml index c6cc1a6..8d29c5a 100644 --- a/.github/workflows/tasks.yaml +++ b/.github/workflows/tasks.yaml @@ -28,3 +28,17 @@ jobs: BRANCH_VERSION: "main" sub_action_location: "sub-action.py" sub_action_Repo: "minoplhy/filters" + restart_when_failed: + name: Restarts the scheduled run when it failed + runs-on: ubuntu-latest + if: github.event_name == 'schedule' && failure() + needs: [build] + steps: + - name: Retry the workflow + run: | + curl -i \ + -X POST \ + -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: token ${{ secrets.API_TOKEN_GITHUB }}" \ + https://api.github.com/repos/minoplhy/filters/actions/workflows/11794283/dispatches \ + -d '{"ref": "${{ github.ref }}" }'