Skip to content

Commit aa20b30

Browse files
Merge branch 'main' into dep/01-09-2024-batch-upgrade
2 parents 298839c + 9ca1186 commit aa20b30

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/workflows/build-python.yml

+11
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,17 @@ jobs:
230230
name: memory-usage
231231
retention-days: 7
232232

233+
retry-on-failure:
234+
if: failure() && fromJSON(github.run_attempt) < 2
235+
needs: [ build-python ]
236+
runs-on: ubuntu-latest
237+
steps:
238+
- env:
239+
GH_REPO: ${{ github.repository }}
240+
GH_TOKEN: ${{ github.token }}
241+
run: gh workflow run retry-workflow.yml --ref ${{ github.ref }} -F run_id=${{ github.run_id }}
242+
243+
233244
install-poetry:
234245
name: "Check if wheel can be installed with using Poetry"
235246
runs-on: ubuntu-latest

.github/workflows/retry-workflow.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Retry workflow
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
run_id:
7+
required: true
8+
description: Id of the failed workflow to retry
9+
jobs:
10+
rerun:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: rerun ${{ inputs.run_id }}
14+
env:
15+
GH_REPO: ${{ github.repository }}
16+
GH_TOKEN: ${{ github.token }}
17+
run: |
18+
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
19+
gh run rerun ${{ inputs.run_id }} --failed

0 commit comments

Comments
 (0)