1
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2025-03-28 11:00:05 +01:00

Improve docs for checking out a private repo

I tried using `actions/checkout` to checkout a private repo using the README, and I bumped into two issues:

1. I thought that `secrets.GitHub_PAT` was something that I got for free. It turns out that the user must create this secret themselves.
2. User-created secrets [cannot start with `GitHub_`](https://docs.github.com/en/actions/reference/encrypted-secrets).

This change updates the README to clarify both of those points.
This commit is contained in:
Nick Holden 2021-04-22 19:40:59 -07:00 committed by GitHub
parent 25a956c84d
commit ebc1037061
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -185,7 +185,7 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
uses: actions/checkout@v2
with:
repository: my-org/my-private-tools
token: ${{ secrets.GitHub_PAT }} # `GitHub_PAT` is a secret that contains your PAT
token: ${{ secrets.MY_GITHUB_PAT }} # `MY_GITHUB_PAT` is a secret you create that contains your PAT
path: my-tools
```