Skip to content

Commit

Permalink
chore: Add top level permissions for GHA workflows (#2398)
Browse files Browse the repository at this point in the history
Add top level permissions for GHA workflows

Signed-off-by: Arko Dasgupta <[email protected]>
  • Loading branch information
arkodg authored Jan 4, 2024
1 parent 8a52bbf commit d748ccb
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- "release/v*"
paths-ignore:
- "**/*.png"

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cherrypick.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
- main
types: ["closed"]

permissions:
contents: read

jobs:
cherry_pick_release_v0_6:
runs-on: ubuntu-22.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
paths:
- 'site/**'

permissions:
contents: read

jobs:
docs-lint:
runs-on: ubuntu-22.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/experimental_conformance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
# Add workflow_dispatch to trigger this workflow manually by maintainers.
workflow_dispatch:

permissions:
contents: read

jobs:
experimental-conformance-test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/latest_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
paths-ignore:
- "**/*.png"

permissions:
contents: read

jobs:
latest-release:
runs-on: ubuntu-22.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
# Sequence of patterns matched against refs/tags
tags:
- "v*.*.*"
permissions:
contents: read

jobs:
release:
runs-on: ubuntu-22.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
schedule:
- cron: '0 */4 * * *'

permissions:
contents: read

jobs:
prune_stale:
permissions:
Expand Down

0 comments on commit d748ccb

Please sign in to comment.