1
0
Fork 0

Update readme to show how to use the secret GITHUB_TOKEN (#131)

* Update readme to show how to use the secret GITHUB_TOKEN

* Adds in link to docs - which I feel seem to be scattered in repos & official docs
pull/134/head
Warren Buckley 2019-09-12 15:50:19 +01:00 committed by Danny McCormick
parent da04d22321
commit b297969f56
1 changed files with 3 additions and 0 deletions

View File

@ -11,6 +11,9 @@ const github = require('@actions/github');
const core = require('@actions/core'); const core = require('@actions/core');
// This should be a token with access to your repository scoped in as a secret. // This should be a token with access to your repository scoped in as a secret.
// The YML workflow will need to set myToken with the GitHub Secret Token
// myToken: ${{ secrets.GITHUB_TOKEN }
// https://help.github.com/en/articles/virtual-environments-for-github-actions#github_token-secret
const myToken = core.getInput('myToken'); const myToken = core.getInput('myToken');
const octokit = new github.GitHub(myToken); const octokit = new github.GitHub(myToken);