Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs with permissions information #166

Open
CasperWA opened this issue Aug 23, 2023 · 1 comment
Open

Update docs with permissions information #166

CasperWA opened this issue Aug 23, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation GH Workflows Issue/PR related to the callable workflows priority/high High priority issue/PR

Comments

@CasperWA
Copy link
Collaborator

Whenever permissions is used to alter or "ensure" the minimum required permissions for GITHUB_TOKEN, this should be mentioned and highlighted in the documentation.
Since the called workflow might fail if the permissions is not also set accordingly in the caller workflow.

There are in general 2 different approaches:

  1. Set the permissions in the caller workflow (either at top-level or for the job that calls the called workflow).
  2. Change the default GITHUB_TOKEN permissions for the repository to the "permissive" scope.

For the second option, the setting in question looks like this:
image

@CasperWA CasperWA added documentation Improvements or additions to documentation GH Workflows Issue/PR related to the callable workflows priority/high High priority issue/PR labels Aug 23, 2023
@CasperWA
Copy link
Collaborator Author

This has been addressed somewhat for the new PyPI Trusted Publisher feature (see #267). However, here the permissions are set externally to the reusable workflows, since this feature currently does not work within a reusable workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation GH Workflows Issue/PR related to the callable workflows priority/high High priority issue/PR
Projects
None yet
Development

No branches or pull requests

1 participant