Skip to content

Commit

Permalink
ci(auto-rerun): output rerun workflow run URL to job summary (#28555)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Nov 7, 2024
1 parent d24a0e6 commit d757da8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/auto-rerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,23 @@ jobs:
bot=app/aquaproj-aqua-registry
info "searching pull requests" >&2
info "searching pull requests"
shas=$(gh -R "$GITHUB_REPOSITORY" pr list \
-A "$bot" \
-S "created:>=$d -label:stop-rerun" \
--json headRefOid \
-q '.[].headRefOid')
for sha in $shas; do
echo "searching workflow runs sha=$sha" >&2
info "searching workflow runs sha=$sha"
runids=$(gh -R "$GITHUB_REPOSITORY" run list \
-c "$sha" \
-s failure \
--json databaseId \
-q '.[].databaseId')
for runid in $runids; do
echo "rerunning a workflow run runid=$runid" >&2
echo "[Rerunning a workflow run]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$runid)" >> "$GITHUB_STEP_SUMMARY"
echo "::notice:: rerunning a workflow run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$runid" >&2
gh -R "$GITHUB_REPOSITORY" run rerun "$runid" --failed
done
done
Expand Down

0 comments on commit d757da8

Please sign in to comment.