pr-preview-action
pr-preview-action copied to clipboard
Restrict permissions of GitHub Actions
It appears that the default permissions on GITHUB_TOKEN
have been changed to read-only. By default, we cannot use this action until we change the settings of Workflow permissions
to Read and write permissions
.
However, Read and write permissions
are too much for this action. I think it should be for contents
and pull-requests
only.
JamesIves/github-pages-deploy-action requires write permission for contents
and marocchino/sticky-pull-request-comment requires write permission for pull-requests
.
This is my first contribution to OSS, so please let me know if I am wrong.
![スクリーンショット 2023-04-09 10 48 32](https://user-images.githubusercontent.com/104971044/230750088-dced806d-0466-40c2-95c3-7b92d8a6c776.png)
You can assign permissions to jobs:
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs