Skip to content

Commit

Permalink
ci: Add GitHub token permissions for workflows (DefinitelyTyped#61065)
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Sharma <[email protected]>
  • Loading branch information
varunsh-coder authored Jul 5, 2022
1 parent 3fe008f commit dc991ec
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: CI
on: pull_request

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/UpdateCodeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- cron: "5 8 * * 1"
workflow_dispatch:

permissions:
contents: read

jobs:
update:
runs-on: ubuntu-latest
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ghostbuster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ on:
required: false
default: "false"

permissions:
contents: read

jobs:
ghostbust:
permissions:
contents: write # for Git to git push
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
pull_request:
paths:
- '**.md'
permissions:
contents: read

jobs:
lint-md:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/support-window.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ on:
# Manually, when TypeScript is released
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch:
permissions:
contents: read

jobs:
support-window:
permissions:
contents: write # for Git to git push
if: github.repository == 'DefinitelyTyped/DefinitelyTyped'
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit dc991ec

Please sign in to comment.