Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0de6af839 | ||
|
|
9d23fb93dd | ||
|
|
3cef845e01 | ||
|
|
7bfa3a4717 | ||
|
|
3c223c7336 | ||
|
|
6c406e8a24 | ||
|
|
beea7b860a | ||
|
|
e982ea3b55 | ||
|
|
34c66235f6 | ||
|
|
78e5f2ddc0 | ||
|
|
d9bc16919c |
@@ -30,7 +30,6 @@ jobs:
|
||||
with:
|
||||
app-id: ${{ vars.APP_ID }}
|
||||
private-key: ${{ secrets.PRIVATE_KEY }}
|
||||
github-api-url: "https://github.acme-inc.com/api/v3"
|
||||
- uses: ./actions/staging-tests
|
||||
with:
|
||||
token: ${{ steps.app-token.outputs.token }}
|
||||
@@ -212,11 +211,11 @@ jobs:
|
||||
|
||||
### `private-key`
|
||||
|
||||
**Required:** GitHub App private key.
|
||||
**Required:** GitHub App private key. Escaped newlines (`\\n`) will be automatically replaced with actual newlines.
|
||||
|
||||
### `owner`
|
||||
|
||||
**Optional:** GitHub App installation owner. If empty, defaults to the current repository owner.
|
||||
**Optional:** The owner of the GitHub App installation. If empty, defaults to the current repository owner.
|
||||
|
||||
### `repositories`
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ inputs:
|
||||
required: false
|
||||
deprecationMessage: "'private_key' is deprecated and will be removed in a future version. Use 'private-key' instead."
|
||||
owner:
|
||||
description: "GitHub App owner (defaults to current repository owner)"
|
||||
description: "The owner of the GitHub App installation (defaults to current repository owner)"
|
||||
required: false
|
||||
repositories:
|
||||
description: "Repositories to install the GitHub App on (defaults to current repository if owner is unset)"
|
||||
|
||||
41052
dist/main.cjs
vendored
41052
dist/main.cjs
vendored
File diff suppressed because one or more lines are too long
28162
dist/post.cjs
vendored
28162
dist/post.cjs
vendored
File diff suppressed because one or more lines are too long
1127
package-lock.json
generated
1127
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -2,7 +2,7 @@
|
||||
"name": "create-github-app-token",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "1.9.0",
|
||||
"version": "1.10.0",
|
||||
"description": "GitHub Action for creating a GitHub App Installation Access Token",
|
||||
"scripts": {
|
||||
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0",
|
||||
@@ -13,20 +13,20 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@octokit/auth-app": "^6.0.4",
|
||||
"@octokit/auth-app": "^7.0.0",
|
||||
"@octokit/request": "^9.0.1",
|
||||
"p-retry": "^6.2.0",
|
||||
"undici": "^6.6.2"
|
||||
"undici": "^6.15.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sinonjs/fake-timers": "^11.2.2",
|
||||
"ava": "^6.1.2",
|
||||
"c8": "^9.1.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"esbuild": "^0.20.1",
|
||||
"esbuild": "^0.20.2",
|
||||
"execa": "^8.0.1",
|
||||
"open-cli": "^8.0.0",
|
||||
"yaml": "^2.4.0"
|
||||
"yaml": "^2.4.2"
|
||||
},
|
||||
"release": {
|
||||
"branches": [
|
||||
|
||||
6
tests/main-private-key-with-escaped-newlines.js
Normal file
6
tests/main-private-key-with-escaped-newlines.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import { test, DEFAULT_ENV } from "./main.js";
|
||||
|
||||
// Verify `main` works correctly when `private-key` input has escaped newlines
|
||||
await test(() => {
|
||||
process.env['INPUT_PRIVATE-KEY'] = DEFAULT_ENV.PRIVATE_KEY.replace(/\n/g, '\\n')
|
||||
});
|
||||
Reference in New Issue
Block a user