From d757da8c90917d2b1a6b341ddc0f15ff7fc0d8c0 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Thu, 7 Nov 2024 09:04:26 +0900 Subject: [PATCH] ci(auto-rerun): output rerun workflow run URL to job summary (#28555) --- .github/workflows/auto-rerun.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-rerun.yaml b/.github/workflows/auto-rerun.yaml index 33b8ff899a..18859444cf 100644 --- a/.github/workflows/auto-rerun.yaml +++ b/.github/workflows/auto-rerun.yaml @@ -25,7 +25,7 @@ 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" \ @@ -33,14 +33,15 @@ jobs: -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