-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
51 lines (51 loc) · 1.89 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
name: 'Psalm baseline progress'
description: 'Calculates psalm baseline diff'
branding:
icon: file-minus
color: purple
inputs:
base_ref:
description: 'git ref to use for calculating the base_score'
required: false
default: '${{ github.event.pull_request.base.sha }}'
head_ref:
description: 'git ref to use for calculating the head_score'
required: false
default: 'HEAD'
path_to_baseline:
description: 'Path to the baseline file'
required: false
default: './psalm-baseline.xml'
template_decreased:
description: 'Template to use when the baseline has decreased'
required: false
default: '🍀 Psalm baseline has decreased: **$BASE_SCORE** → **$HEAD_SCORE** _(**${SCORE_DIFF}**)_'
template_increased:
description: 'Template to use when the baseline has grown'
required: false
default: '📛 Psalm baseline has increased: **$BASE_SCORE** → **$HEAD_SCORE** _(**+${SCORE_DIFF}**)_'
template_no_change:
description: 'Template to use when the baseline score hasn''t changed'
required: false
default: 'Psalm baseline score remained the same: **$HEAD_SCORE**'
outputs:
base_score:
description: 'Baseline score for the pull request base'
head_score:
description: 'Baseline score for the pull request head'
score_diff:
description: 'Difference between the two scores (head_score - base_score)'
score_diff_string:
description: 'Same as `score_diff`, with a `+` prepended for positive numbers'
output_message:
description: 'Parsed output based on the `template_*` inputs'
runs:
using: 'docker'
image: 'Dockerfile'
env:
BASE_REF: ${{ inputs.base_ref }}
HEAD_REF: ${{ inputs.head_ref }}
PATH_TO_BASELINE: ${{ inputs.path_to_baseline }}
TEMPLATE_DECREASED: ${{ inputs.template_decreased }}
TEMPLATE_INCREASED: ${{ inputs.template_increased }}
TEMPLATE_NO_CHANGE: ${{ inputs.template_no_change }}