docs: document client ID support for app-id
Co-authored-by: parkerbxyz <[email protected]>
This commit is contained in:
co-authored by
parkerbxyz
parent
e9da44231a
commit
8204e76db8
@@ -9,9 +9,11 @@ GitHub Action for creating a GitHub App installation access token.
|
|||||||
In order to use this action, you need to:
|
In order to use this action, you need to:
|
||||||
|
|
||||||
1. [Register new GitHub App](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app).
|
1. [Register new GitHub App](https://docs.github.com/apps/creating-github-apps/setting-up-a-github-app/creating-a-github-app).
|
||||||
2. [Store the App's ID or Client ID in your repository environment variables](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example: `APP_ID`).
|
2. [Store the App's Client ID (recommended) or App ID in your repository environment variables](https://docs.github.com/actions/learn-github-actions/variables#defining-configuration-variables-for-multiple-workflows) (example: `APP_ID`).
|
||||||
3. [Store the App's private key in your repository secrets](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example: `PRIVATE_KEY`).
|
3. [Store the App's private key in your repository secrets](https://docs.github.com/actions/security-guides/encrypted-secrets?tool=webui#creating-encrypted-secrets-for-a-repository) (example: `PRIVATE_KEY`).
|
||||||
|
|
||||||
|
Pass the App's Client ID or App ID using the `app-id` input. GitHub recommends using the Client ID when available.
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> An installation access token expires after 1 hour. Please [see this comment](https://github.com/actions/create-github-app-token/issues/121#issuecomment-2043214796) for alternative approaches if you have long-running processes.
|
> An installation access token expires after 1 hour. Please [see this comment](https://github.com/actions/create-github-app-token/issues/121#issuecomment-2043214796) for alternative approaches if you have long-running processes.
|
||||||
|
|
||||||
@@ -318,7 +320,7 @@ If you set `HTTP_PROXY` or `HTTPS_PROXY`, also set `NODE_USE_ENV_PROXY: "1"` on
|
|||||||
|
|
||||||
### `app-id`
|
### `app-id`
|
||||||
|
|
||||||
**Required:** GitHub App ID.
|
**Required:** GitHub App Client ID or App ID. GitHub recommends using the Client ID when available.
|
||||||
|
|
||||||
### `private-key`
|
### `private-key`
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ branding:
|
|||||||
color: "gray-dark"
|
color: "gray-dark"
|
||||||
inputs:
|
inputs:
|
||||||
app-id:
|
app-id:
|
||||||
description: "GitHub App ID"
|
description: "GitHub App ID or Client ID"
|
||||||
required: true
|
required: true
|
||||||
private-key:
|
private-key:
|
||||||
description: "GitHub App private key"
|
description: "GitHub App private key"
|
||||||
|
|||||||
@@ -1,3 +1,20 @@
|
|||||||
|
exports[`main-client-id.test.js > stdout 1`] = `
|
||||||
|
Inputs 'owner' and 'repositories' are not set. Creating token for this repository (actions/create-github-app-token).
|
||||||
|
::add-mask::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
|
||||||
|
::set-output name=installation-id::123456
|
||||||
|
|
||||||
|
::set-output name=app-slug::github-actions
|
||||||
|
::save-state name=token::ghs_16C7e42F292c6912E7710c838347Ae178B4a
|
||||||
|
::save-state name=expiresAt::2016-07-11T22:14:10Z
|
||||||
|
--- REQUESTS ---
|
||||||
|
GET /repos/actions/create-github-app-token/installation
|
||||||
|
POST /app/installations/123456/access_tokens
|
||||||
|
{"repositories":["create-github-app-token"]}
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`main-custom-github-api-url.test.js > stdout 1`] = `
|
exports[`main-custom-github-api-url.test.js > stdout 1`] = `
|
||||||
Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
|
Inputs 'owner' and 'repositories' are set. Creating token for the following repositories:
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { test } from "./main.js";
|
||||||
|
|
||||||
|
// Verify `main` accepts a GitHub App client ID via the `app-id` input
|
||||||
|
await test(() => {
|
||||||
|
process.env["INPUT_APP-ID"] = "Iv1.0123456789abcdef";
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user