From eb4ccf51f6ca241e9d98b79061e93fc5938c7235 Mon Sep 17 00:00:00 2001 From: Wei He Date: Tue, 6 Oct 2020 20:16:09 -0400 Subject: [PATCH] docs: recommend PAT over GITHUB_TOKEN GITHUB_TOKEN does not have access to push to branches with workflow file changes --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e64247b27..3b083bea3 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ A GitHub Action for syncing the current repository using **force push**. ## Usage +Create a personal access token and add to repository's secret as `PAT` + ### GitHub Actions ``` # File: .github/workflows/repo-sync.yml @@ -38,7 +40,7 @@ jobs: source_repo: "" source_branch: "" destination_branch: "" - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.PAT }} ``` If `source_repo` is private or with another provider, either (1) use an authenticated HTTPS repo clone url like `https://${access_token}@github.com/owner/repository.git` or (2) set a `SSH_PRIVATE_KEY` secret environment variable and use the SSH clone url