-
Notifications
You must be signed in to change notification settings - Fork 12
/
action.yml
96 lines (96 loc) · 3.59 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
# Copyright 2023 Andrew Chen Wang
# Copyright 2023 Jacob Hummer
# SPDX-License-Identifier: Apache-2.0
name: GitHub Wiki Action
author: Andrew Chen Wang <[email protected]>
description: 📖 Deploy docs from your source tree to the GitHub wiki
branding:
icon: book
color: blue
inputs:
strategy:
description: >-
Select from 'clone' or 'init' to determine which method to use to push
changes to the GitHub wiki. 'clone' will clone the .wiki.git repo and add
an additional commit. 'init' will create a new repo with a single commit
and force push to the .wiki.git. 'init' involves a force-push! The default
is 'clone'.
required: true
default: clone
repository:
description: >-
The repository housing the wiki. Use this if you're publishing to a wiki
that's not the current repository. You can change the GitHub server with
the github-server-url input. Default is github.repository.
required: true
default: ${{ github.repository }}
github-server-url:
description: >-
An alternate https://github.com URL, usually for GitHub Enterprise
deployments under your own domain. Default is github.server_url (usually
https://github.com).
required: true
default: ${{ github.server_url }}
token:
description: >-
github.token is the default. This token is used when cloning and pushing
wiki changes.
required: true
default: ${{ github.token }}
path:
description: >-
The directory to use for your wiki contents. Default wiki.
required: true
default: wiki
commit-message:
description: >-
The message to use when committing new content. Default is 'Update wiki
github.sha'. You probably don't need to change this, since this only
applies if you look really closely in your wiki.
required: true
default: Update wiki ${{ github.sha }}
ignore:
description: >-
A multiline list of files that should be ignored when committing and
pushing to the remote wiki. Each line is a pattern like .gitignore. Make
sure these paths are relative to the path option! The default is none.
required: true
default: ""
dry-run:
description: >-
Whether or not to actually attempt to push changes back to the wiki
itself. If this is set to true, we instead print the remote URL and do not
push to the remote wiki. The default is false. This is useful for testing.
required: true
default: false
preprocess:
description: >-
If this option is true, we will preprocess the wiki to move the README.md
to Home.md as well as rewriting all .md links to be bare links. This helps
ensure that the Markdown works in source control as well as the wiki. The
default is true.
required: true
default: true
outputs:
wiki_url:
description: >-
The HTTP URL that points to the deployed repository's wiki tab. This is
essentially the concatenation of github.server_url, github.repository, and
the /wiki page.
value: ${{ steps.main.outputs.wiki_url }}
runs:
using: composite
steps:
- id: main
run: '"${GITHUB_ACTION_PATH%/}/cliw"'
shell: bash
env:
INPUT_STRATEGY: ${{ inputs.strategy }}
INPUT_REPOSITORY: ${{ inputs.repository }}
INPUT_GITHUB_SERVER_URL: ${{ inputs.github-server-url }}
INPUT_TOKEN: ${{ inputs.token }}
INPUT_PATH: ${{ inputs.path }}
INPUT_COMMIT_MESSAGE: ${{ inputs.commit-message }}
INPUT_IGNORE: ${{ inputs.ignore }}
INPUT_DRY_RUN: ${{ inputs.dry-run }}
INPUT_PREPROCESS: ${{ inputs.preprocess }}