Skip to content

Commit 6baca6b

Browse files
Junyi Houclaude
andcommitted
fix: add permissions to backend caller workflows
Reusable workflows inherit permissions from the caller. Without explicit permissions in the callers, the nested jobs requesting packages:write and contents:write are denied. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 850a89a commit 6baca6b

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/build-backend-dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
branches:
55
- development
66

7+
permissions:
8+
contents: write
9+
packages: write
10+
711
jobs:
812
build-backend-and-push:
913
runs-on: ubuntu-latest

.github/workflows/build-backend-prd.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
repository_dispatch:
77
types: [prd]
88

9+
permissions:
10+
contents: write
11+
packages: write
12+
913
jobs:
1014
build-backend-and-push:
1115
runs-on: ubuntu-latest

.github/workflows/build-backend-stg.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
repository_dispatch:
77
types: [stg]
88

9+
permissions:
10+
contents: write
11+
packages: write
12+
913
jobs:
1014
build-backend-and-push:
1115
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)