From b1323b2f1cbf719c4cdb337d466c9a82b0ca154e Mon Sep 17 00:00:00 2001 From: Federico Grandi Date: Fri, 3 Dec 2021 20:10:07 +0100 Subject: [PATCH] docs(README): add FAQ about GitHub PATs Fixes #318 --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index ab0952eb..6426ede5 100644 --- a/README.md +++ b/README.md @@ -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.