Skip to content

Commit

Permalink
Merge pull request #78 from marcofranssen/main
Browse files Browse the repository at this point in the history
Document the required workflow permissions
  • Loading branch information
Owen Rumney authored Sep 16, 2022
2 parents 53821b4 + d8b6fff commit fe0dc24
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ To add the action, add `tfsec_pr_commenter.yml` into the `.github/workflows` dir

The contents of `tfsec_pr_commenter.yml` should be;

> **Note**: The GITHUB_TOKEN injected to the workflow will need permissions to write on pull requests.
>
> This can be achieved by adding a permissions block in your workflow definition.
>
> See: [docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)
> for more details.
```yaml
name: tfsec-pr-commenter
on:
Expand All @@ -18,6 +25,10 @@ jobs:
name: tfsec PR commenter
runs-on: ubuntu-latest

permissions:
contents: read
pull-requests: write

steps:
- name: Clone repo
uses: actions/checkout@master
Expand Down

0 comments on commit fe0dc24

Please sign in to comment.