generated from technote-space/gh-actions-template
-
-
Notifications
You must be signed in to change notification settings - Fork 29
/
action.yml
180 lines (155 loc) · 4.44 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: TOC Generator
description: GitHub Action to generate TOC.
author: technote-space
inputs:
GITHUB_TOKEN:
description: Secret GitHub API token used to make API requests or git authentication.
default: ${{ github.token }}
required: true
API_TOKEN:
description: Secret GitHub API token used to make API requests.
required: false
TARGET_PATHS:
description: Target file path. (Comma separated, @see https://github.com/thlorenz/doctoc#adding-toc-to-individual-files)
default: 'README*.md'
required: true
TOC_TITLE:
description: TOC Title
default: '**Table of Contents**'
required: false
FOLDING:
description: Whether to fold.
required: false
MAX_HEADER_LEVEL:
description: Max header level.
required: false
ENTRY_PREFIX:
description: Entry prefix.
required: false
OPENING_COMMENT:
description: Opening comment (for other than DocToc)
required: false
default: '<!-- toc '
CLOSING_COMMENT:
description: Closing comment (for other than DocToc)
required: false
default: '<!-- tocstop '
HTML_MODE:
description: Whether it is html mode (deprecated).
required: false
HTML_TEMPLATE:
description: Html template for html mode (deprecated)
required: false
default: <p align="center">${ITEMS}</p>
CUSTOM_MODE:
description: Whether it is custom mode.
required: false
CUSTOM_TEMPLATE:
description: CUSTOM template for custom mode
required: false
ITEM_TEMPLATE:
description: Item template for custom mode
required: false
default: <a href="${LINK}">${TEXT}</a>
SEPARATOR:
description: Separator for custom mode
required: false
default: <span>|</span>
COMMIT_MESSAGE:
description: Commit message.
required: true
default: 'chore(docs): update TOC'
COMMIT_NAME:
description: Git commit name.
default: ''
required: false
COMMIT_EMAIL:
description: Git commit email.
default: ''
required: false
CREATE_PR:
description: Whether to create PullRequest.
required: false
CHECK_ONLY_DEFAULT_BRANCH:
description: Whether to check only default branch.
required: false
PR_BRANCH_PREFIX:
description: PullRequest branch prefix.
default: 'toc-generator/'
required: true
PR_BRANCH_NAME:
description: PullRequest branch name.
default: 'update-toc-${PR_ID}'
required: true
PR_TITLE:
description: PullRequest title.
required: true
default: 'chore(docs): update TOC (${PR_MERGE_REF})'
PR_BODY:
description: PullRequest body.
required: true
default: |
## Base PullRequest
${PR_TITLE} (${PR_NUMBER_REF})
## Command results
<details>
<summary>Details: </summary>
${COMMANDS_OUTPUT}
</details>
## Changed files
<details>
<summary>${FILES_SUMMARY}: </summary>
${FILES}
</details>
<hr>
[:octocat: Repo](${ACTION_URL}) | [:memo: Issues](${ACTION_URL}/issues) | [:department_store: Marketplace](${ACTION_MARKETPLACE_URL})
PR_COMMENT_BODY:
description: PullRequest body.
required: false
default: |
## Command results
<details>
<summary>Details: </summary>
${COMMANDS_OUTPUT}
</details>
## Changed files
<details>
<summary>${FILES_SUMMARY}: </summary>
${FILES}
</details>
<hr>
[:octocat: Repo](${ACTION_URL}) | [:memo: Issues](${ACTION_URL}/issues) | [:department_store: Marketplace](${ACTION_MARKETPLACE_URL})
PR_DEFAULT_BRANCH_PREFIX:
description: PullRequest branch prefix for default branch.
default: ''
required: false
PR_DEFAULT_BRANCH_NAME:
description: PullRequest branch name for default branch.
default: ''
required: false
PR_DEFAULT_BRANCH_TITLE:
description: PullRequest title for default branch.
default: ''
required: false
PR_DEFAULT_BRANCH_BODY:
description: PullRequest body for default branch.
default: ''
required: false
PR_CLOSE_MESSAGE:
description: Message body when closing PullRequest.
default: 'This PR has been closed because it is no longer needed.'
required: false
TARGET_BRANCH_PREFIX:
description: Filter by branch name. (e.g. release/)
default: ''
required: false
INCLUDE_LABELS:
description: Labels used to check if the PullRequest has it.
default: ''
required: false
branding:
icon: 'book-open'
color: 'blue'
runs:
using: node12
main: lib/main.js