feat: add ability to auth to github api
docs: add authentication snippet example
docs: update checkout@v3, create-pull-request@v4
docs: add documentation about the github token secret
Review: Add suggested change from last week
(per
https://github.com/fluxcd/flux2/pull/3474#discussion_r1067178730)
Signed-off-by: Erik Kristensen <erik@erikkristensen.com>
Signed-off-by: Kingdon Barrett <kingdon@weave.works>
pull/3501/head
Erik Kristensen2 years agocommitted byKingdon Barrett
@ -35,6 +35,20 @@ You can download a specific version with:
version: 0.32.0
```
You can also authenticate against the GitHub API using GitHub Actions' `GITHUB_TOKEN` secret.
For more information, please [read about the GitHub token secret](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret).
```yaml
steps:
- name: Setup Flux CLI
uses: fluxcd/flux2/action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
```
This is useful if you are seeing failures on shared runners, those failures are usually API limits being hit.
### Automate Flux updates
Example workflow for updating Flux's components generated with `flux bootstrap --path=clusters/production`: