-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
action.yml
67 lines (63 loc) · 1.72 KB
/
action.yml
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
67
---
name: alls-green
description: >-
GitHub Action for checking that the test matrix jobs are all
successful before proceeding. To be used in branch protection
author: >-
Sviatoslav Sydorenko <wk+~github.com/re-actors/alls-green@sydorenko.org.ua>
branding:
icon: check-circle
color: green
inputs:
jobs:
description: >-
A list of jobs from the `needs` context, serialized as a JSON
string via `toJSON(needs)`
required: true
allowed-failures:
default: >-
[]
description: >-
Job names that are allowed to fail and not affect the outcome,
as a comma-separated list or serialized as a JSON string
required: false
allowed-skips:
default: >-
[]
description: >-
Job names that are allowed to be skipped and not affect the
outcome, as a comma-separated list or serialized as a JSON string
required: false
outputs:
failure:
description: Whether this check decided that the job matrix failed.
value: ${{ steps.outcome.outputs.failure }}
result:
description: Failure or success result of the job matrix.
value: ${{ steps.outcome.outputs.result }}
success:
description: Whether this check decided that the job matrix succeeded.
value: ${{ steps.outcome.outputs.success }}
runs:
using: composite
steps:
- name: Decide whether the input jobs succeeded or failed
id: outcome
env:
PYTHONPATH: ${{ github.action_path }}/src
run: |
python -m normalize_needed_jobs_status \
"$(cat << EOM
${{ inputs.allowed-failures }}
EOM
)" \
"$(cat << EOM
${{ inputs.allowed-skips }}
EOM
)" \
"$(cat << EOM
${{ inputs.jobs }}
EOM
)"
shell: bash
...