CI hygiene: split deploy job + dedicated env, skip CI on docs-only changes#332
Merged
Conversation
Only the publish job needs `id-token: write`, narrowing the OIDC trust boundary as suggested in #330 (comment). The publish job is also pinned to a `pypi` GitHub environment so maintainers can scope the trusted-publisher binding (and any future protection rules / secrets) to that environment.
Adds paths-ignore for docs/, *.md, *.rst, and LICENSE on the pull_request, push, and pull_request_target triggers in the two integration workflows. Avoids spending lint, mock, and cloud test minutes on changes that can't affect runtime behavior.
Contributor
|
Thanks @nuwang ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two unrelated CI tweaks bundled together.
1. Tighten trusted-publishing blast radius (follow-up to #330). ping @nsoranzo
Addresses #330 (comment).
deploy.yamlintobuild_packages(no special permissions, uploads the sdist/wheel as an artifact) andpublish(downloads and uploads). Onlypublishrequestsid-token: write, so the OIDC token can no longer be minted during the build step.publishjob to a dedicatedpypiGitHub environment so the trusted-publisher binding (and any future protection rules / environment-scoped secrets) is isolated to that environment rather than the whole repo.PyPI and Test PyPI trusted-publisher configuration already updated.
2. Skip integration CI on docs-only changes
Adds
paths-ignorefordocs/**,**.md,**.rst, andLICENSEon every trigger inintegration.yamlandintegration-cloud.yaml. Doc-only PRs and pushes no longer burn lint, mock-provider, and cloud-provider test minutes.