fix(ci): grant permissions to reusable workflow calls#561
Conversation
…nd pack-tutorials
The top-level `permissions: {}` added in #517 restricts all jobs to zero
permissions by default. The `build-notebooks` jobs that call the reusable
workflow did not override this, so GitHub Actions refused to start them
(startup_failure). Add the required `actions: read` and `contents: write`
permissions to both calling jobs.
Fixes the v0.5.7 release docs build failure.
Code Review: PR #561fix(ci): grant permissions to reusable workflow calls in build-docs and pack-tutorials Author: @andreatgretel | Base: SummaryThis PR fixes a CI regression introduced by #517 (supply chain hardening), which set top-level The fix adds explicit FindingsCorrectness
Consistency
Potential Concerns
Nits
VerdictApprove. This is a clean, minimal fix for a CI regression. The granted permissions are the exact minimum required by the called workflow, the placement is correct per GitHub Actions semantics, and the change follows the existing patterns in these workflow files. No issues found. |
Greptile SummaryThis PR fixes
|
| Filename | Overview |
|---|---|
| .github/workflows/build-docs.yml | Adds permissions: { actions: read, contents: write } to the build-notebooks reusable workflow call, exactly matching the permissions the called workflow's job already declares. |
| .github/workflows/pack-tutorials.yml | Adds permissions: { actions: read, contents: write } to the build-notebooks reusable workflow call — same fix applied symmetrically. |
Sequence Diagram
sequenceDiagram
participant Trigger as Release / workflow_dispatch
participant BD as build-docs.yml
participant PT as pack-tutorials.yml
participant BN as build-notebooks.yml (reusable)
Trigger->>BD: fires
Note over BD: permissions: {} (top-level)
BD->>BN: uses: build-notebooks.yml<br/>permissions: {actions: read, contents: write}
Note over BN: job build:<br/>permissions: {actions: read, contents: write}
BN-->>BD: artifact: notebooks
BD->>BD: deploy job (contents: write)
Trigger->>PT: fires
Note over PT: permissions: {} (top-level)
PT->>BN: uses: build-notebooks.yml<br/>permissions: {actions: read, contents: write}
BN-->>PT: artifact: notebooks
PT->>PT: zip-and-upload (contents: write)
Reviews (2): Last reviewed commit: "Merge branch 'main' into andreatgretel/f..." | Re-trigger Greptile
📋 Summary
The
permissions: {}added in #517 (CI supply chain hardening) restricts all jobs to zero permissions by default. Thebuild-notebooksjobs inbuild-docsandpack-tutorialscall the reusablebuild-notebooks.ymlworkflow but didn't override this, so GitHub Actions refused to start them (startup_failure). This broke the v0.5.7 release docs build and tutorial packing.🔗 Related Issue
Fixes the v0.5.7 release
Build docsandPack tutorialsstartup failures.🔄 Changes
permissions: { actions: read, contents: write }to thebuild-notebooksreusable workflow job inbuild-docs.ymlandpack-tutorials.ymlbuild-notebooks.yml) already declares🧪 Testing
make testpasses — N/A, CI-only changeworkflow_dispatchofBuild docsfrom the PR branch after merge✅ Checklist