-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
49 lines (45 loc) · 1.36 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
name: "Automate GitHub Wiki page maintenance"
description: "Add tables of contents to Markdown wiki pages."
author: Justin Forest <[email protected]>
branding:
icon: "file-text"
color: "green"
inputs:
path:
description: "The folder where the wiki repository files are."
required: true
update_tocs:
description: "Update existing tables of contents."
required: false
default: true
update_backlinks:
description: "Update existing backlinks."
required: false
default: true
backlinks_header:
description: "Override the default backlinks header."
required: false
default: "## Pages that link here"
toc_header:
description: "Override the default table of contents header."
required: false
default: "**Table of Contents:**"
runs:
using: "composite"
steps:
- name: "Update backlinks"
run: |
python3 $ACTION_PATH/bin/update-backlinks $INPUT_PATH/*.md
shell: bash
env:
INPUT_PATH: ${{ inputs.path }}
ACTION_PATH: ${{ github.action_path }}
WIKI_BACKLINKS_HEADER: ${{ inputs.backlinks_header }}
- name: "Update tables of contents"
run: |
python3 $ACTION_PATH/bin/update-tocs $INPUT_PATH/*.md
shell: bash
env:
INPUT_PATH: ${{ inputs.path }}
ACTION_PATH: ${{ github.action_path }}
WIKI_TOC_HEADER: ${{ inputs.toc_header }}