-
-
Notifications
You must be signed in to change notification settings - Fork 146
Open
Description
It's a nuance, but there shouldn't be a need to input GITHUB_TOKEN if it can be avoided.
It may also help resolve #232.
An example implementation:
# action.yml
inputs:
githubToken:
description: "The GitHub access token (e.g. secrets.GITHUB_TOKEN) used to ... This defaults to {{ github.token }}."
default: "${{ github.token }}"
required: false// src/index.js
const githubToken = core.getInput("githubToken", {required: true})
// OR
// src/parseConfig.js
let githubToken;
if (process.env.INPUT_GITHUBTOKEN) {
githubToken = ConfigParser.parseString(process.env.INPUT_GITHUBTOKEN)
}// src/index.js
const client = github.getOctokit(githubToken, {
baseUrl: githubBaseUrl
});wojciech-kulik and niklv
Metadata
Metadata
Assignees
Labels
No labels