Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(auto-rerun): output rerun workflow run URL to job summary #28555

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading