Repository navigation
ci: name the secrets' environments on the cron jobs (#1968) - #1993
Merged
Merged
Conversation
`ANACONDA_TOKEN` moves to the `anaconda` environment, and the `PYPCAPKIT` PAT and `PYPCAPKIT_ACTIONS_DEPLOY_KEY` to `conda-tag`. GitHub hands an environment's secrets only to a job that names it, so Conda Update's `conda-update`, `conda-tag` and `conda-dist`, and Vendor Update's `vendor-update`, now declare the environment holding the secret each reads. - tests/project/test_secret_environments_1968.py scans every workflow and asserts each job reading one of these secrets names its environment. - workflows.rst lists the cron jobs' environments, citing jobs by name rather than by line; the line anchors it no longer cites are dropped.
Owner
Author
|
GOOD TO GO at |
Contributor
|
Coverage: 91.52% (unit tier, Python 3.15,
Per-file detail: the |
5 tasks done
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.
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— workflows or build toolingDescription of your pull request and other information
The owner is moving three secrets out of the repository level and into environments:
ANACONDA_TOKENintoanaconda;PYPCAPKITtoken andPYPCAPKIT_ACTIONS_DEPLOY_KEYintoconda-tag.create-release.ymlalready names these environments, but the cron jobs don't, so they would lose the secrets. This change names them:conda-update,conda-tag→conda-tag;conda-dist→anacondavendor-update→conda-tagTest. The new
tests/project/test_secret_environments_1968.pyasserts that every job reading one of the three secrets names its environment. It fails without the workflow edit (4 SUBFAILED) and passes with it.Docs.
workflows.rstnow lists the cron jobs and no longer citescreate-release.ymlby line; the matchingRELEASE_CITATIONSpins are removed.Deployment records. Each run of these jobs now records a deployment.
environment: {name: …, deployment: false}would avoid that while keeping secret access (see GitHub's "Using environments without deployments"). Say if you'd prefer it.Merge this before moving the secrets. An environment secret takes precedence over a repository secret of the same name. Add the secrets to the environments first, then delete the repository copies.
Part of #1968.