forked from tibdex/github-app-token
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
56 lines (54 loc) · 2.39 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
name: GitHub App token
author: Thibault Derousseaux <tibdex@gmail.com>
description: Run a GitHub Action as a GitHub App instead of using secrets.GITHUB_TOKEN or a personal access token.
inputs:
app_id:
description: ID of the GitHub App.
required: true
github_api_url:
description: The API URL of the GitHub server.
default: ${{ github.api_url }}
installation_retrieval_mode:
description: >-
The mode used to retrieve the installation for which the token will be requested.
One of:
- id: use the installation with the specified ID.
- organization: use an organization installation (https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-an-organization-installation-for-the-authenticated-app).
- repository: use a repository installation (https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-a-repository-installation-for-the-authenticated-app).
- user: use a user installation (https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#get-a-user-installation-for-the-authenticated-app).
default: repository
installation_retrieval_payload:
description: >-
The payload used to retrieve the installation.
Examples for each retrieval mode:
- id: 1337
- organization: github
- repository: tibdex/github-app-token
- user: tibdex
default: ${{ github.repository }}
permissions:
description: >-
The JSON-stringified permissions granted to the token.
Defaults to all permissions granted to the GitHub app.
See https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app's `permissions`.
private_key:
description: Private key of the GitHub App (can be Base64 encoded).
required: true
repositories:
description: >-
The JSON-stringified array of the full names of the repositories the token should have access to.
Defaults to all repositories that the installation can access.
See https://docs.github.com/en/rest/apps/apps?apiVersion=2022-11-28#create-an-installation-access-token-for-an-app's `repositories`.
revoke:
description: Revoke the token at the end of the job.
default: true
outputs:
token:
description: An installation access token for the GitHub App.
runs:
using: node20
main: dist/main/index.js
post: dist/post/index.js
branding:
icon: unlock
color: gray-dark