workflow permissions

The workflow or job key that sets exactly what the GITHUB_TOKEN may do, such as contents: read.

In more detail

Writing the block replaces all defaults, so list everything the job needs. A common pattern keeps the whole workflow read-only and grants write access only to the one job that needs it.

Example

permissions:
  contents: read

Related terms

Taught in

References

Certification courses