v3 new release (#87)

add token
This commit is contained in:
github-actions[bot]
2022-07-25 13:23:27 -04:00
committed by GitHub
parent e4f3964f67
commit 84b304dfb7
31 changed files with 1057 additions and 2 deletions

19
node_modules/@octokit/auth-action/dist-src/index.js generated vendored Normal file
View File

@ -0,0 +1,19 @@
import { createTokenAuth } from "@octokit/auth-token";
export const createActionAuth = function createActionAuth() {
if (!process.env.GITHUB_ACTION) {
throw new Error("[@octokit/auth-action] `GITHUB_ACTION` environment variable is not set. @octokit/auth-action is meant to be used in GitHub Actions only.");
}
const definitions = [
process.env.GITHUB_TOKEN,
process.env.INPUT_GITHUB_TOKEN,
process.env.INPUT_TOKEN,
].filter(Boolean);
if (definitions.length === 0) {
throw new Error("[@octokit/auth-action] `GITHUB_TOKEN` variable is not set. It must be set on either `env:` or `with:`. See https://github.com/octokit/auth-action.js#createactionauth");
}
if (definitions.length > 1) {
throw new Error("[@octokit/auth-action] The token variable is specified more than once. Use either `with.token`, `with.GITHUB_TOKEN`, or `env.GITHUB_TOKEN`. See https://github.com/octokit/auth-action.js#createactionauth");
}
const token = definitions.pop();
return createTokenAuth(token);
};