Skip to content

Commit c4823b0

Browse files
committed
Update ci-auto-rerun-failed-jobs.yml
1 parent f244c38 commit c4823b0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/ci-auto-rerun-failed-jobs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,21 @@ on:
1414
required: true
1515
github_repo:
1616
description: "The repository to rerun the workflow"
17-
required: true
17+
required: false
1818
distinct_id:
1919
description: "The distinct id of the workflow to rerun"
2020
required: false
2121

22+
run-name: ci auto rerun failed jobs - attempt ${{ inputs.attempts }}
23+
2224
jobs:
2325
gh-cli-rerun:
2426
name: rerun - attempt ${{ inputs.attempts }}
2527
permissions:
2628
actions: write
2729
runs-on: ubuntu-latest
2830
env:
29-
GH_TOKEN: "${{ secrets.PERSONAL_TOKEN || github.token }}"
31+
GH_TOKEN: "${{ secrets.AUTO_RERUN || github.token }}"
3032
steps:
3133
- name: Host - Checkout action ${{ inputs.distinct_id }}
3234
uses: actions/checkout@v4
@@ -52,7 +54,7 @@ jobs:
5254
printf '\n%b\n' "🟥 Failures at:\n\n\`\`\`log\n${failures}\n\`\`\`" >> $GITHUB_STEP_SUMMARY
5355
printf '\n%b\n' "🟦 Attempt: ${{ inputs.attempts }} - Rerun failed jobs in ${{ inputs.run_id }} :hammer:" >> $GITHUB_STEP_SUMMARY
5456
55-
if gh run watch ${{ inputs.run_id }} --exit-status; then
57+
if gh run watch ${{ inputs.run_id }} --exit-status --repo "${github_repo}"; then
5658
printf '\n%b\n' "✅ Attempt: ${{ inputs.attempts }} succeeded 😺" >> $GITHUB_STEP_SUMMARY
5759
else
5860
printf '\n%b\n' "❌ Attempt: ${{ inputs.attempts }} failed 😾" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)