-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yaml
59 lines (54 loc) · 2.3 KB
/
action.yaml
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
name: 'Org Action'
description: 'Github action for preparing org-level github token and git checkout using github app secrets'
inputs:
app_id:
description: "default env.GITHUB_APP_ID"
app_private_key:
description: "default env.GITHUB_APP_PRIVATE_KEY"
app_permission:
description: >
comma-seperated value, supported:
- `contents-ro` : git checkout permission
- `contents-rw` : git commit and permission, it contains contents-ro also
- `actions-rw` : github actions(workflow) read and execute permission
- `checks-rw` : github checks read and write permission
- `administration-ro` : github administration read only permission
- `pull-requests-rw` : github pull-requests read and write permission
- `issues-ro` : github issues read only permission
- `issues-rw` : github issues read and write permission
default: "contents-ro"
checkout:
description: |
multiline-input, formatted "<repository>@<ref>: <checkout path>"
repository should exist in same owner of workflow's and able to read with github app token
<repository> should be repository name without owner or `<owner>/<name>`
`@<ref>` can be omitted and uses `main` branch by default.
if repository is same with workflow's and @ref is omitted, it uses github.ref instead.
be caution order of the lines, this actions delete path before checkout to avoid conflict.
outer path should be defined first and inner path should be defined last.
for example,
```yaml
with:
checkout:
ab180/web-server: .
ab180/common-lib: ./lib/common-lib
```
default: ""
cwd:
description: "current working directory."
default: ${{github.workspace}}
add_git_config:
description: "add github app token into git config to use when checkout organization repository"
default: 'true'
action_token:
description: "token used when check out itself"
default: ${{ github.token }}
fetch-depth:
description: "number of commits to fetch. 0 indicates all history for all branches and tags."
default: 1
outputs:
token:
description: "github app token, it is also exported to environment named as `GITHUB_APP_TOKEN` and can be used in same job"
runs:
using: node16
main: dist/index.js