Skip to content

Commit ed324bf

Browse files
fix(ci): grant callers the permissions their reusable workflows declare (#754)
GitHub refuses these runs at workflow-creation time: `Error calling workflow ... The workflow is requesting '<perm>', but is only allowed '<none>'.` A `workflow_call` job must grant a superset of the callee's declared permissions. This adds the canonical grant (`actions: read`, `contents: read`, `security-events: write`) that the healthy repos already carry.
1 parent 6a6dc4b commit ed324bf

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎.github/workflows/mirror.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ jobs:
1414
mirror:
1515
uses: hyperpolymath/standards/.github/workflows/mirror-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd
1616
secrets: inherit
17+
permissions:
18+
actions: read
19+
contents: read
20+
security-events: write

‎.github/workflows/scorecard.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
analysis:
1616
uses: hyperpolymath/standards/.github/workflows/scorecard-reusable.yml@571cc734cd69fb846032ec77a662aa8ee4fc32cd
1717
permissions:
18+
actions: read
1819
contents: read
1920
security-events: write
2021
id-token: write

‎.github/workflows/spark-theatre-gate.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ jobs:
3131
with:
3232
paths: "."
3333
enforce_zero_contract: false
34+
permissions:
35+
actions: read
36+
contents: read
37+
security-events: write

0 commit comments

Comments
 (0)