Remove token from checkout step in npm-publish.yml#50
Conversation
Removed token usage for checkout step in workflow.
|
There was a problem hiding this comment.
Pull request overview
Updates the npm-publish GitHub Actions workflow to stop using a Personal Access Token (PAT) for the repository checkout step, relying on default credentials instead.
Changes:
- Removed
token: ${{ secrets.PAT }}from theactions/checkoutstep in the publish workflow.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| uses: actions/checkout@master | ||
| with: | ||
| fetch-depth: 0 |
There was a problem hiding this comment.
This workflow later commits/pushes changes (git-auto-commit-action). Removing the PAT from the checkout step changes the git credentials to the default GITHUB_TOKEN; if the repo/org default workflow token permissions are read-only or branch protections require a PAT, the push will fail. Consider explicitly setting permissions: contents: write for the job and/or passing the intended token to the push/commit step rather than relying on checkout credentials.
Removed token usage for checkout step in workflow.