Skip to content

Commit eca05d3

Browse files
authored
ci: declare contents:read on Lint workflow (#2989)
The Lint workflow runs cpplint and pylint against the checked-out tree. No cache, no GitHub API write. `permissions: contents: read` captures that and matches the per-job permissions blocks already used in deploy_nightly_docs.yml (pages:write + id-token:write) and upload-ci-logs.yml (statuses:write). build.yml is left out because it pulls mozilla-actions/sccache-action (which writes to the Actions cache) and easimon/maximize-build-space. A drive-by permissions block there would need actions:write for the sccache save path, which deserves a separate look. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
1 parent c40398c commit eca05d3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ concurrency:
1111
# Group by workflow name + PR number (for PRs) or ref (for branch/tag pushes)
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1313
cancel-in-progress: true
14+
permissions:
15+
contents: read
1416
jobs:
1517
pytorch_cpplint:
1618
name: 'PyTorch C++'

0 commit comments

Comments
 (0)