Set Token Permissions on GitHub workflows #269
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Reviewdog | |
on: | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: read | |
jobs: | |
bazel: | |
permissions: | |
checks: write # for reviewdog/action-suggester to report issues using checks | |
contents: read # for actions/checkout to fetch code | |
name: Bazel Buildifier | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
sudo python3 -m pip install -U numpy pip black pyupgrade | |
bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:lint -- bazel | |
- uses: reviewdog/action-suggester@v1 | |
black: | |
permissions: | |
checks: write # for reviewdog/action-suggester to report issues using checks | |
contents: read # for actions/checkout to fetch code | |
name: Python Black | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
sudo python3 -m pip install -U numpy pip black pyupgrade | |
bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:lint -- black | |
- uses: reviewdog/action-suggester@v1 | |
clang: | |
permissions: | |
checks: write # for reviewdog/action-suggester to report issues using checks | |
contents: read # for actions/checkout to fetch code | |
name: Clang Format | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
sudo python3 -m pip install -U numpy pip black pyupgrade | |
bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:lint -- clang | |
- uses: reviewdog/action-suggester@v1 | |
pyupgrade: | |
permissions: | |
checks: write # for reviewdog/action-suggester to report issues using checks | |
contents: read # for actions/checkout to fetch code | |
name: Python Pyupgrade | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
sudo python3 -m pip install -U numpy pip black pyupgrade | |
bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:lint -- pyupgrade | |
- uses: reviewdog/action-suggester@v1 |