Skip to content

Commit

Permalink
ci: restrict permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaduck committed Jul 4, 2024
1 parent f4f9e4a commit 0b53682
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name: CI

on: [push, pull_request]

permissions:
contents: read

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
Expand Down
6 changes: 6 additions & 0 deletions new-package/github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name: CI
# events but only for the main branch
on: [push, pull_request]

permissions:
contents: read

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
Expand Down Expand Up @@ -64,6 +67,9 @@ jobs:
publish:
needs: [test] # make sure all your other jobs succeed before trying to publish

permissions:
contents: write

# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name: CI
# events but only for the main branch
on: [push, pull_request]

permissions:
contents: read

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
Expand Down Expand Up @@ -64,6 +67,9 @@ jobs:
publish:
needs: [test] # make sure all your other jobs succeed before trying to publish

permissions:
contents: write

# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name: CI
# events but only for the main branch
on: [push, pull_request]

permissions:
contents: read

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
Expand Down Expand Up @@ -64,6 +67,9 @@ jobs:
publish:
needs: [test] # make sure all your other jobs succeed before trying to publish

permissions:
contents: write

# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down

0 comments on commit 0b53682

Please sign in to comment.