Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
80 lines (76 loc) · 2.48 KB
/
Copy pathaction.yml
File metadata and controls
80 lines (76 loc) · 2.48 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: "rumdl-action"
description: "Lint and format Markdown files with rumdl"
author: "rvben"
branding:
icon: "check-circle"
color: "orange"
inputs:
version:
description: "Version of rumdl to install (default: latest)"
required: false
default: ""
command:
description: |
Which rumdl command to run.
Possible values: check (default), fmt-check, fmt
`fmt-check` reports files that are not formatted and leaves them alone;
`fmt` rewrites them in the workspace.
required: false
default: "check"
path:
description: "File(s) or directories to lint, space-separated (default: workspace root)"
required: false
default: ""
config:
description: "Path to config file"
required: false
default: ""
report-type:
description: |
How this action should report results.
Possible values: logs (default), annotations
required: false
default: "logs"
fail-on-error:
description: "Fail the workflow if violations are found (default: true)"
required: false
default: "true"
output-file:
description: "Write results to this file path (optional)"
required: false
default: ""
args:
description: "Additional CLI arguments passed to the selected command (e.g. --extend-disable MD013,MD024)"
required: false
default: ""
install-only:
description: |
Install rumdl and add it to PATH without linting, so later steps can call
`rumdl` themselves (e.g. from a Makefile). All lint inputs are ignored.
Possible values: false (default), true
required: false
default: "false"
outputs:
rumdl-version:
description: "Version of rumdl that was installed"
value: ${{ steps.rumdl.outputs.rumdl-version }}
rumdl-path:
description: "Absolute path to the installed rumdl executable"
value: ${{ steps.rumdl.outputs.rumdl-path }}
runs:
using: "composite"
steps:
- name: Install rumdl and lint Markdown files
id: rumdl
shell: bash
run: '"$GITHUB_ACTION_PATH/scripts/rumdl-action.sh"'
env:
GHA_RUMDL_VERSION: ${{ inputs.version }}
GHA_RUMDL_INSTALL_ONLY: ${{ inputs.install-only }}
GHA_RUMDL_COMMAND: ${{ inputs.command }}
GHA_RUMDL_PATH: ${{ inputs.path }}
GHA_RUMDL_CONFIG: ${{ inputs.config }}
GHA_RUMDL_REPORT_TYPE: ${{ inputs.report-type }}
GHA_RUMDL_FAIL_ON_ERROR: ${{ inputs.fail-on-error }}
GHA_RUMDL_OUTPUT_FILE: ${{ inputs.output-file }}
GHA_RUMDL_ARGS: ${{ inputs.args }}