-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinputs.ts
More file actions
27 lines (22 loc) · 601 Bytes
/
inputs.ts
File metadata and controls
27 lines (22 loc) · 601 Bytes
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
import { getInput } from "@actions/core";
export const TOKEN = {
name: "token",
};
export const CONFIG_PATH = {
name: "config",
defaultValue: ".github/preview-updater.yml",
};
export const README_PATH = {
name: "readme",
defaultValue: "README.md",
};
export const parse = () => {
const token = getInput(TOKEN.name, { required: true });
const configPath = getInput(CONFIG_PATH.name) || CONFIG_PATH.defaultValue;
const readmePath = getInput(README_PATH.name) || README_PATH.defaultValue;
return {
token,
configPath,
readmePath,
};
};