Skip to content

Commit

Permalink
automatically rerun failed jobs in debian workflow (#958)
Browse files Browse the repository at this point in the history
  • Loading branch information
kickster97 authored Feb 20, 2025
1 parent 7b8ea56 commit 43d3991
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,13 @@ jobs:
https://packagecloud.io/api/v1/repos/${{ github.repository }}-head/packages.json
done
if: github.event_name != 'pull_request'
rerun_on_failure:
needs: build_deb
if: failure() && github.run_attempt < 3
runs-on: ubuntu-latest
steps:
- name: Trigger rerun workflow
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run rerun.yml -f run_id=${{ github.run_id }}
19 changes: 19 additions & 0 deletions .github/workflows/rerun.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# .github/workflows/rerun.yml

name: Rerun Failed Workflow

on:
workflow_dispatch:
inputs:
run_id:
required: true

jobs:
rerun:
runs-on: ubuntu-latest
steps:
- name: Rerun failed jobs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run rerun ${{ inputs.run_id }} --failed

0 comments on commit 43d3991

Please sign in to comment.