From f1aa6c26222b3cf975026049d22c4caf27cb0eb4 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Thu, 28 Apr 2022 22:11:27 -0400 Subject: [PATCH] ci: only rerun failed jobs on `/retest` Unlike `rerun_url`, this endpoint isn't in the run API response, but we can construct it manually easily. Documentation for it is here: https://docs.github.com/en/rest/actions/workflow-runs#re-run-failed-jobs-from-a-workflow-run Signed-off-by: JP Simard --- .github/actions/retest-action/entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/retest-action/entrypoint.sh b/.github/actions/retest-action/entrypoint.sh index 5526617c..3ab1ed2f 100755 --- a/.github/actions/retest-action/entrypoint.sh +++ b/.github/actions/retest-action/entrypoint.sh @@ -27,10 +27,10 @@ curl --request GET \ --header "authorization: Bearer ${GITHUB_TOKEN}" \ --header "content-type: application/json" | jq '.workflow_runs | max_by(.run_number)' > run.json -RERUN_URL=$(jq -r '.rerun_url' run.json) +RUN_URL=$(jq -r '.rerun_url' run.json) curl --request POST \ - --url "${RERUN_URL}" \ + --url "${RUN_URL}/rerun-failed-jobs" \ --header "authorization: Bearer ${GITHUB_TOKEN}" \ --header "content-type: application/json" @@ -42,4 +42,4 @@ curl --request POST \ --header "authorization: Bearer ${GITHUB_TOKEN}" \ --header "accept: application/vnd.github.squirrel-girl-preview+json" \ --header "content-type: application/json" \ - --data '{ "content" : "rocket" }' \ No newline at end of file + --data '{ "content" : "rocket" }'