Skip to content

Commit 3a1f2d6

Browse files
authored
chore: GH workflow permissions (#33)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 3a72119 commit 3a1f2d6

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/native-builds.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ env:
1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
1212
cancel-in-progress: true
13+
14+
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
15+
permissions: {}
16+
1317
jobs:
1418
builder:
1519
strategy:
@@ -18,8 +22,8 @@ jobs:
1822
os: ['ubuntu-24.04', 'ubuntu-24.04-arm', 'macos-13', 'macos-15']
1923
runs-on: ${{ matrix.os }}
2024
permissions:
21-
contents: write
22-
packages: write
25+
contents: read
26+
packages: write # needed for publishing to GH container registry
2327
steps:
2428
- uses: actions/checkout@v4
2529
- name: setup upx

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@ on:
55
tags:
66
- 'v*'
77

8+
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
9+
permissions: {}
10+
811
jobs:
912
pkg:
1013
runs-on: ubuntu-latest
1114
permissions:
1215
contents: read
13-
packages: write
16+
packages: write # needed for publishing to GH package registry
1417
steps:
1518
- uses: actions/checkout@v4
1619
- name: Use Node.js

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ on:
66
concurrency:
77
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
88
cancel-in-progress: true
9+
10+
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token
11+
permissions: {}
12+
913
jobs:
1014
pkg:
1115
runs-on: ubuntu-latest
1216
permissions:
1317
contents: read
14-
packages: write
1518
steps:
1619
- uses: actions/checkout@v4
1720
- name: Use Node.js

0 commit comments

Comments
 (0)