Repository navigation
66 lines (59 loc) · 2.05 KB
/
Copy pathworkflow-result.yml
File metadata and controls
66 lines (59 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Workflow Result
on:
# The result suite reacts to finished CI runs, which only workflow_run
# reports. It checks out no code and hands the event only to Saltyorg actions.
# jactionlint ignore=dangerous-triggers
workflow_run:
workflows: ["CI", "CI - Every OS"]
types:
- completed
concurrency:
group: workflow-result-${{ github.event.workflow_run.id }}
cancel-in-progress: true
permissions: {}
jobs:
handle-failure:
if: contains(fromJSON('["failure", "timed_out", "startup_failure"]'), github.event.workflow_run.conclusion)
runs-on: ubuntu-26.04
timeout-minutes: 10
permissions:
actions: write
contents: read
pull-requests: read
steps:
- name: Classify and retry failure
id: retry
continue-on-error: true
uses: saltyorg/github-actions/retry@v1.5.4
with:
github-token: ${{ github.token }}
non-retryable-jobs: |
ansible-lint
saltbox-lint
check-entries
find-roles
- name: Notify terminal failure
if: always() && (steps.retry.outputs.decision == 'terminal' || steps.retry.outcome == 'failure')
uses: saltyorg/github-actions/notify@v1.5.4
with:
github-token: ${{ github.token }}
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}
terminal-reason: ${{ steps.retry.outputs.reason || 'retry-orchestration-error' }}
execution-attempt: ${{ steps.retry.outputs.execution-attempt }}
- name: Fail on retry orchestration error
if: steps.retry.outcome == 'failure'
run: exit 1
notify-completion:
if: contains(fromJSON('["success", "cancelled"]'), github.event.workflow_run.conclusion)
runs-on: ubuntu-26.04
timeout-minutes: 10
permissions:
actions: read
contents: read
pull-requests: read
steps:
- name: Notify workflow completion
uses: saltyorg/github-actions/notify@v1.5.4
with:
github-token: ${{ github.token }}
discord-webhook: ${{ secrets.DISCORD_WEBHOOK }}