Skip to content

Commit 769485b

Browse files
olof-nordJohannesHoppe
authored andcommitted
docs: Update the GitHub Actions readme and example
GitHub automagically sets up a token for the pipeline, if the value `secrets.GITHUB_TOKEN` is used. Using this value means no manual token management is required See more here: https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#using-the-github_token-in-a-workflow
1 parent 2b33d1c commit 769485b

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

docs/README_environment_github_actions.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,15 @@ As Github has introduced [Github Actions](https://github.com/features/actions),
1515

1616
Please ensure that you've read the prerequisites section before continuing with this section.
1717

18-
### Setup Tokens
18+
### Automatic GitHub Action Token
1919

20-
1. Create a [Personal Access Token with repo access](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) (POA) and copy the token.
21-
- Make sure it has this access:
22-
23-
![repo access](img/repo-access.png)
24-
2. Open up your Github repo.
25-
3. Go to **Settings** > **Secrets** and click on **Add a new secret** link.
20+
GitHub provides a token that you can use to authenticate on behalf of GitHub Actions.
2621

27-
![add new secret](img/add-new-secret.png)
28-
4. Create a secret with name `GH_TOKEN` and paste your POA, which you copied in step 1, in value.
22+
GitHub automatically creates a `GITHUB_TOKEN` secret to use in your workflow.
23+
You can use the `GITHUB_TOKEN` to authenticate in a workflow run.
2924

30-
![secret name and value](img/secret-token-value.png)
25+
More info can be found here:
26+
[help.github.com](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#using-the-github_token-in-a-workflow)
3127

3228
### Setup Github Action Flow
3329

@@ -65,7 +61,7 @@ Please ensure that you've read the prerequisites section before continuing with
6561
npm run deploy -- --name="<YOUR_GITHUB_USERNAME>" --email=<YOUR_GITHUB_USER_EMAIL_ADDRESS>
6662
env:
6763
CI: true
68-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
64+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6965
```
7066
7167
4. Make sure to replace **<YOUR_GITHUB_USERNAME>** and **<YOUR_GITHUB_USER_EMAIL_ADDRESS>** with correct values in above snippet.

docs/img/add-new-secret.png

-38.3 KB
Binary file not shown.

docs/img/repo-access.png

-19.9 KB
Binary file not shown.

docs/img/secret-token-value.png

-23.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)