fix(ci): grant permissions to reusable workflow calls#561
fix(ci): grant permissions to reusable workflow calls#561andreatgretel wants to merge 1 commit intomainfrom
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 actions: read and contents: write permissions to the build-notebooks reusable workflow call, matching the permissions declared in build-notebooks.yml's build job. |
| .github/workflows/pack-tutorials.yml | Adds actions: read and contents: write permissions to the build-notebooks reusable workflow call, matching the permissions declared in build-notebooks.yml's build job. |
Sequence Diagram
sequenceDiagram
participant BD as build-docs.yml
participant PT as pack-tutorials.yml
participant BN as build-notebooks.yml
Note over BD: permissions: {}
Note over PT: permissions: {}
BD->>BN: uses: build-notebooks.yml<br/>permissions: {actions: read, contents: write}
activate BN
Note over BN: build job<br/>permissions: {actions: read, contents: write}
BN-->>BD: artifact: notebooks
deactivate BN
PT->>BN: uses: build-notebooks.yml<br/>permissions: {actions: read, contents: write}
activate BN
Note over BN: build job<br/>permissions: {actions: read, contents: write}
BN-->>PT: artifact: notebooks
deactivate BN
Reviews (1): Last reviewed commit: "fix(ci): grant permissions to reusable w..." | 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