Skip to content

Commit

Permalink
CI: Add GitHub token permissions for workflows (#36325)
Browse files Browse the repository at this point in the history
Co-authored-by: XhmikosR <[email protected]>
  • Loading branch information
varunsh-coder and XhmikosR authored Dec 16, 2022
1 parent af34b2b commit 471edac
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ env:
FORCE_COLOR: 2
NODE: 18

permissions:
contents: read

jobs:
browserstack:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/bundlewatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
FORCE_COLOR: 2
NODE: 18

permissions:
contents: read

jobs:
bundlewatch:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ on:
env:
FORCE_COLOR: 2

permissions:
contents: read

jobs:
cspell:
permissions:
# allow streetsidesoftware/cspell-action to fetch files for commits and PRs
contents: read
pull-requests: read
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
FORCE_COLOR: 2
NODE: 18

permissions:
contents: read

jobs:
css:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
FORCE_COLOR: 2
NODE: 18

permissions:
contents: read

jobs:
docs:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/issue-close-require.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ on:
schedule:
- cron: "0 0 * * *"

permissions:
contents: read

jobs:
issue-close-require:
permissions:
# allow actions-cool/issues-helper to update issues and PRs
issues: write
pull-requests: write
runs-on: ubuntu-latest
if: github.repository == 'twbs/bootstrap'
steps:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/issue-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ on:
issues:
types: [labeled]

permissions:
contents: read

jobs:
issue-labeled:
permissions:
# allow actions-cool/issues-helper to update issues and PRs
issues: write
pull-requests: write
if: github.repository == 'twbs/bootstrap'
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ env:
FORCE_COLOR: 2
NODE: 18

permissions:
contents: read

jobs:
run:
permissions:
# allow coverallsapp/github-action to create new checks issues and fetch code
checks: write
contents: read
name: JS Tests
runs-on: ubuntu-latest

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
FORCE_COLOR: 2
NODE: 18

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/node-sass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
FORCE_COLOR: 2
NODE: 18

permissions:
contents: read

jobs:
css:
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ on:
- main
workflow_dispatch:

permissions:
contents: read

jobs:
update_release_draft:
permissions:
# allow release-drafter/release-drafter to create GitHub releases and add labels to PRs
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: github.repository == 'twbs/bootstrap'
steps:
Expand Down

0 comments on commit 471edac

Please sign in to comment.