mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
workflow retry logic
This commit is contained in:
parent
7c95b78604
commit
5aa82db68a
7 changed files with 85 additions and 0 deletions
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
@ -2246,3 +2246,14 @@ jobs:
|
|||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
||||
retry-if-needed:
|
||||
needs:
|
||||
- set-pipeline-exit-status
|
||||
if: failure() && fromJSON(github.run_attempt) < 3
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
|
||||
|
|
11
.github/workflows/nightly.yml
vendored
11
.github/workflows/nightly.yml
vendored
|
@ -3168,3 +3168,14 @@ jobs:
|
|||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
||||
retry-if-needed:
|
||||
needs:
|
||||
- set-pipeline-exit-status
|
||||
if: failure() && fromJSON(github.run_attempt) < 3
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
|
||||
|
|
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
|
@ -485,3 +485,14 @@ jobs:
|
|||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
||||
retry-if-needed:
|
||||
needs:
|
||||
- set-pipeline-exit-status
|
||||
if: failure() && fromJSON(github.run_attempt) < 3
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
|
||||
|
|
19
.github/workflows/retry-workflow.yml
vendored
Normal file
19
.github/workflows/retry-workflow.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
name: Retry workflow
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
run_id:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
rerun:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: rerun ${{ inputs.run_id }}
|
||||
env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
|
||||
gh run rerun ${{ inputs.run_id }} --failed
|
11
.github/workflows/scheduled.yml
vendored
11
.github/workflows/scheduled.yml
vendored
|
@ -2295,3 +2295,14 @@ jobs:
|
|||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
||||
retry-if-needed:
|
||||
needs:
|
||||
- set-pipeline-exit-status
|
||||
if: failure() && fromJSON(github.run_attempt) < 3
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
|
||||
|
|
11
.github/workflows/staging.yml
vendored
11
.github/workflows/staging.yml
vendored
|
@ -3076,3 +3076,14 @@ jobs:
|
|||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
||||
retry-if-needed:
|
||||
needs:
|
||||
- set-pipeline-exit-status
|
||||
if: failure() && fromJSON(github.run_attempt) < 3
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
|
||||
|
|
11
.github/workflows/templates/layout.yml.jinja
vendored
11
.github/workflows/templates/layout.yml.jinja
vendored
|
@ -376,3 +376,14 @@ jobs:
|
|||
if: always()
|
||||
run:
|
||||
echo "All worflows finished"
|
||||
|
||||
retry-if-needed:
|
||||
needs:
|
||||
- set-pipeline-exit-status
|
||||
if: failure() && fromJSON(github.run_attempt) < 3
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: gh workflow run retry-workflow.yml -F run_id=${{ github.run_id }}
|
||||
|
|
Loading…
Add table
Reference in a new issue