Skip to content

Commit

Permalink
Merge pull request #946 from chromaui/action-permissions
Browse files Browse the repository at this point in the history
Restrict permissions in GitHub Action workflows
  • Loading branch information
ghengeveld committed Mar 13, 2024
2 parents 419e60d + e488b49 commit 4ddf650
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/check-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]

permissions: {}

jobs:
check-labels:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/chromatic-main-and-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
pull_request:
types: [assigned, ready_for_review, review_requested]

permissions:
contents: read

jobs:
chromatic:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/chromatic-prod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Chromatic
on: push

permissions:
contents: read

jobs:
chromatic:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/chromatic-staging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Chromatic (staging)
on: push

permissions:
contents: read

jobs:
chromatic:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:
- package.json
- storybook-addon.*

permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via action
on: push

permissions:
contents: read

jobs:
self-test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-node-api.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via node api
on: push

permissions:
contents: read

jobs:
self-test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-node18.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via Node 18
on: push

permissions:
contents: read

jobs:
self-test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-node20.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via Node 20
on: push

permissions:
contents: read

jobs:
self-test:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-npx.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via npx
on: push

permissions:
contents: read

jobs:
chromatic:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via yarn on Windows
on: push

permissions:
contents: read

jobs:
chromatic:
runs-on: windows-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-yarn-berry.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via yarn berry
on: push

permissions:
contents: read

jobs:
chromatic:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-yarn-canary.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via yarn canary
on: push

permissions:
contents: read

jobs:
chromatic:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-yarn-classic.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via yarn classic
on: push

permissions:
contents: read

jobs:
chromatic:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test-yarn.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Smoke test via yarn
on: push

permissions:
contents: read

jobs:
self-test:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 4ddf650

Please sign in to comment.