Skip to content

Commit

Permalink
docs: recommend PAT over GITHUB_TOKEN
Browse files Browse the repository at this point in the history
GITHUB_TOKEN does not have access to push to branches with workflow file changes
  • Loading branch information
wei authored Oct 7, 2020
1 parent 3c4d8fe commit eb4ccf5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit eb4ccf5

Please sign in to comment.