From b297969f566be6201e76fb984983b94a403cd05e Mon Sep 17 00:00:00 2001 From: Warren Buckley Date: Thu, 12 Sep 2019 15:50:19 +0100 Subject: [PATCH] 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 --- packages/github/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/github/README.md b/packages/github/README.md index b4312568..d441949f 100644 --- a/packages/github/README.md +++ b/packages/github/README.md @@ -11,6 +11,9 @@ const github = require('@actions/github'); const core = require('@actions/core'); // 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 octokit = new github.GitHub(myToken);