Skip to content

Commit 09d4870

Browse files
chore: explicit permission in actions (#3411)
* ci: explicit permission in actions * fix: pnpm allow build flag * chore: add comment --------- Co-authored-by: Qiao Han <[email protected]>
1 parent cae4a03 commit 09d4870

File tree

10 files changed

+37
-5
lines changed

10 files changed

+37
-5
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
branches:
77
- develop
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
test:
1114
name: Test

.github/workflows/deploy-check.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Check Deploy
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types:
66
- opened
77
- reopened
@@ -10,6 +10,9 @@ on:
1010
branches:
1111
- main
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
check:
1518
if: github.head_ref != 'develop'

.github/workflows/install.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
- 'package.json'
1515
- 'scripts/**'
1616

17+
permissions:
18+
contents: write
19+
1720
jobs:
1821
pack:
1922
runs-on: ubuntu-latest
@@ -99,7 +102,8 @@ jobs:
99102

100103
- run: npm install -g pnpm
101104
- run: pnpm init
102-
- run: pnpm i --save-dev ./supabase-1.28.0.tgz
105+
# https://github.com/pnpm/pnpm/issues/9124#issuecomment-2663021284
106+
- run: pnpm i --save-dev ./supabase-1.28.0.tgz --allow-build=supabase
103107
- run: pnpm supabase --version
104108

105109
bun:

.github/workflows/mirror-image.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
required: true
1414
type: string
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
mirror:
1821
runs-on: ubuntu-latest

.github/workflows/mirror.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ on:
1919
- submitted
2020
workflow_dispatch:
2121

22+
permissions:
23+
contents: read
24+
2225
jobs:
2326
setup:
2427
runs-on: ubuntu-latest

.github/workflows/pg-prove.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Publish pg_prove
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
settings:
811
runs-on: ubuntu-latest

.github/workflows/publish-migra.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Publish migra
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
settings:
811
runs-on: ubuntu-latest
@@ -70,9 +73,9 @@ jobs:
7073
password: ${{ secrets.DOCKER_PASSWORD }}
7174
- name: Merge multi-arch manifests
7275
run: |
73-
docker buildx imagetools create -t ${{ needs.settings.outputs.image_tag }} \
74-
${{ needs.settings.outputs.image_tag }}_amd64 \
75-
${{ needs.settings.outputs.image_tag }}_arm64
76+
docker buildx imagetools create -t "${{ needs.settings.outputs.image_tag }}" \
77+
"${{ needs.settings.outputs.image_tag }}_amd64" \
78+
"${{ needs.settings.outputs.image_tag }}_arm64"
7679
7780
publish:
7881
needs:

.github/workflows/release-beta.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- develop
77
workflow_dispatch:
88

9+
permissions:
10+
contents: write
11+
912
jobs:
1013
release:
1114
name: semantic-release

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
- main
77
workflow_call:
88

9+
permissions:
10+
contents: write
11+
packages: write
12+
913
jobs:
1014
settings:
1115
runs-on: ubuntu-latest

.github/workflows/tag-npm.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
required: true
1414
type: string
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
tag:
1821
name: Move latest tag

0 commit comments

Comments
 (0)