Skip to content

Commit

Permalink
docs(README): add FAQ about GitHub PATs
Browse files Browse the repository at this point in the history
  • Loading branch information
EndBug committed Dec 3, 2021
1 parent 15c2ba6 commit b1323b2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -125,6 +125,13 @@ Changing the token with which the repo is configured can be useful if you want t

The action automatically gets the GitHub token from a `github_token` input: this input should not be modified by the user, since it doesn't affect the commits as it's only used to access the GitHub API to get user info, in case they selected that option for the commit author.

### The commit from the action is not triggering CI!

That's because you're checking out the repo using the built-in [`GITHUB_TOKEN` secret](https://docs.github.com/en/actions/security-guides/automatic-token-authentication): GitHub sees that the push event has been triggered by a commit generated by CI, and doesn't run any further checks to avoid unintentional check loops.

**If you're sure** that you want the commits generated during CI to trigger other workflow runs, you can checkout the repo using a [Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token): this will make the resulting commit the same as if you made it yourself.
If you're using `actions/checkout`, check out their [docs](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) to see how to set your repo token.

### About `actions/checkout`

The token you use when setting up the repo with this action will determine what token `add-and-commit` will use.
Expand Down

0 comments on commit b1323b2

Please sign in to comment.