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
});
It's a nuance, but there shouldn't be a need to input
GITHUB_TOKENif it can be avoided.It may also help resolve #232.
An example implementation: