Skip to content

Commit 6277209

Browse files
committed
ci: harden publish settings
1 parent 520b2f7 commit 6277209

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ on:
77

88
jobs:
99
publish:
10+
# prevents this action from running on forks
11+
if: github.repository == 'vitejs/launch-editor'
1012
runs-on: ubuntu-latest
1113
permissions:
1214
contents: read
1315
id-token: write
16+
environment: Release
1417

1518
steps:
1619
- name: Checkout repository
@@ -31,6 +34,9 @@ jobs:
3134
# disable cache, to avoid cache poisoning (https://docs.zizmor.sh/audits/#cache-poisoning)
3235
package-manager-cache: false
3336

37+
- name: Disallow installation scripts
38+
run: yq '.allowBuilds[]=false' -i pnpm-workspace.yaml
39+
3440
- name: Install dependencies
3541
run: pnpm install --frozen-lockfile
3642

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
packages:
22
- 'packages/*'
3+
allowBuilds:
4+
yorkie: true

0 commit comments

Comments
 (0)