-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
53 lines (53 loc) · 1.94 KB
/
Copy pathaction.yml
File metadata and controls
53 lines (53 loc) · 1.94 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
name: 'confdiff — semantic config diff'
description: 'Comment the real key/value changes in JSON/YAML/TOML/INI/.env/CSV/XML config files on a PR — not text noise.'
author: 'Esperanza Volkov'
branding:
icon: 'git-commit'
color: 'purple'
inputs:
paths:
description: 'Optional space/comma-separated pathspecs limiting which changed files are checked (e.g. "config/** *.yaml").'
required: false
default: ''
args:
description: 'Extra arguments passed to confdiff (e.g. "--loose --ignore metadata.*").'
required: false
default: ''
redact:
description: 'Mask secret values (passwords/tokens/keys) as fingerprints in the PR comment, so config drift is shown without leaking credentials. Recommended for repos with secrets-bearing config.'
required: false
default: 'false'
base:
description: 'Git ref to diff against. Defaults to the PR base (or the push "before" SHA).'
required: false
default: ''
comment:
description: 'Post/update a single sticky PR comment with the semantic diff. Requires github-token and PR context.'
required: false
default: 'true'
github-token:
description: 'Token used to post the PR comment.'
required: false
default: ${{ github.token }}
fail-on-diff:
description: 'Exit non-zero (fail the job) when semantic differences or parse errors are found.'
required: false
default: 'false'
outputs:
changed:
description: 'true if any semantic differences were found'
value: ${{ steps.confdiff.outputs.changed }}
runs:
using: 'composite'
steps:
- id: confdiff
shell: bash
env:
INPUT_PATHS: ${{ inputs.paths }}
INPUT_ARGS: ${{ inputs.args }}
INPUT_REDACT: ${{ inputs.redact }}
INPUT_BASE: ${{ inputs.base }}
INPUT_COMMENT: ${{ inputs.comment }}
INPUT_FAIL_ON_DIFF: ${{ inputs.fail-on-diff }}
GITHUB_TOKEN: ${{ inputs.github-token }}
run: node "$GITHUB_ACTION_PATH/action/index.mjs"