mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Pull in workflow-finished changes from 3006.x
This commit is contained in:
parent
029b96c996
commit
3be907b608
1 changed files with 1 additions and 28 deletions
29
.github/workflows/workflow-finished.yml
vendored
29
.github/workflows/workflow-finished.yml
vendored
|
@ -6,6 +6,7 @@ on:
|
|||
workflows:
|
||||
- CI
|
||||
- Nightly
|
||||
- Scheduled
|
||||
- Stage Release
|
||||
types:
|
||||
- completed
|
||||
|
@ -17,21 +18,9 @@ permissions:
|
|||
|
||||
jobs:
|
||||
|
||||
show-context:
|
||||
name: Show Github Context
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: event
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: |
|
||||
echo "$GITHUB_CONTEXT"
|
||||
|
||||
restart-failed-jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.run_attempt < 5 }}
|
||||
needs:
|
||||
- show-context
|
||||
steps:
|
||||
- name: Restart failed jobs
|
||||
env:
|
||||
|
@ -39,19 +28,3 @@ jobs:
|
|||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh run rerun ${{ github.event.workflow_run.id }} --failed
|
||||
|
||||
# Branch protection rules require this to run with exit code 0.
|
||||
set-pipeline-exit-status:
|
||||
name: Set the ${{ github.event.workflow.name }} Pipeline Exit Status
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.run_attempt >= 5 }}
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- show-context
|
||||
steps:
|
||||
- shell: bash
|
||||
run:
|
||||
if [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then
|
||||
exit 1;
|
||||
else
|
||||
exit 0;
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue