Skip to content

Commit

Permalink
ci: restrict permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaduck authored and jfmengels committed Jul 9, 2024
1 parent bb735b6 commit 6c1e25b
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 @@ -8,6 +8,9 @@ defaults:
run:
shell: bash

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 6c1e25b

Please sign in to comment.