-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
45 lines (42 loc) · 1.32 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
name: Remark Markdown processor
description: Markdown processor
author: tj-actions
inputs:
plugins:
description: 'List of [remarkjs plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md).'
required: true
default: "remark-toc"
files:
description: ' List of input markdown files '
required: true
default: "README.md"
rc_path:
description: 'Remark configuration file'
required: false
args:
description: '[remark cli](https://github.com/unifiedjs/unified-args#cli) options.'
required: true
default: "--output"
runs:
using: 'composite'
steps:
- run: |
npm install -g [email protected]
npm install -g $INPUT_PLUGINS
RC_PATH=${INPUT_RC_PATH:-"${{ github.action_path }}/.remarkrc.json"}
for path in $INPUT_FILES
do
npx remark "$path" --rc-path="${RC_PATH}" ${INPUT_ARGS}
done
id: remark
shell: bash
env:
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
INPUT_RC_PATH: ${{ inputs.rc_path }}
INPUT_PLUGINS: ${{ inputs.plugins }}
INPUT_FILES: ${{ inputs.files }}
INPUT_ARGS: ${{ inputs.args }}
branding:
icon: file-text
color: white