Interview Prep/Git & GitHub/GitHub Actions, environments and releases in production

What do you put in `permissions:` for a build, a release and a PR comment workflow?

IntermediateProductionGitHub Actions, environments and releases in production
Answer

Build: contents: read. Release: contents: write (and packages: write or id-token: write only if needed). PR comment bot: pull-requests: write. Declaring at the workflow level and then granting more at job level keeps blast radius small.

All Git & GitHub questions Roadmap: Git & GitHub

More on GitHub Actions, environments and releases in production