docs: document client ID support for app-id
Co-authored-by: parkerbxyz <17183625+parkerbxyz@users.noreply.github.com>
This commit is contained in:
@@ -9,9 +9,11 @@ GitHub Action for creating a GitHub App installation access token.
|
||||
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).
|
||||
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`).
|
||||
|
||||
Pass the App's Client ID or App ID using the `app-id` input. GitHub recommends using the Client ID when available.
|
||||
|
||||
> [!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.
|
||||
|
||||
@@ -318,7 +320,7 @@ If you set `HTTP_PROXY` or `HTTPS_PROXY`, also set `NODE_USE_ENV_PROXY: "1"` on
|
||||
|
||||
### `app-id`
|
||||
|
||||
**Required:** GitHub App ID.
|
||||
**Required:** GitHub App Client ID or App ID. GitHub recommends using the Client ID when available.
|
||||
|
||||
### `private-key`
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ branding:
|
||||
color: "gray-dark"
|
||||
inputs:
|
||||
app-id:
|
||||
description: "GitHub App ID"
|
||||
description: "GitHub App ID or Client ID"
|
||||
required: true
|
||||
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`] = `
|
||||
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