Skip to content

ci: name the secrets' environments on the cron jobs (#1968) - #1993

Merged
JarryShaw merged 1 commit into
mainfrom
ci/1968-cron-environments
Oct 20, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
ci/1968-cron-environments

Conversation

@JarryShaw

@JarryShaw JarryShaw commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • ci — workflows or build tooling

Description of your pull request and other information

The owner is moving three secrets out of the repository level and into environments:

  • ANACONDA_TOKEN into anaconda;
  • the PYPCAPKIT token and PYPCAPKIT_ACTIONS_DEPLOY_KEY into conda-tag.

create-release.yml already names these environments, but the cron jobs don't, so they would lose the secrets. This change names them:

  • Conda Update conda-update, conda-tag → conda-tag; conda-dist → anaconda
  • Vendor Update vendor-update → conda-tag

Test. The new tests/project/test_secret_environments_1968.py asserts 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.rst now lists the cron jobs and no longer cites create-release.yml by line; the matching RELEASE_CITATIONS pins 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.

`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.
@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Oct 20, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 7f0c4f250. A Sonnet review checked every secrets. read under .github: each job reading the three secrets now names the matching environment, and no secrets: inherit or reusable-workflow path reads them. anaconda and conda-tag have no protection rules and no branch policy, so the crons are not held. The new test fails without the workflow edit (4 failed) and passes with it. Every create-release.yml environment the dropped citation pins covered is still asserted elsewhere.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 20, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.52% (unit tier, Python 3.15, 7f0c4f250, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19597 881 2618 867 92.11%
pcapkit/corekit 2540 71 808 37 96.54%
pcapkit/dumpkit 276 3 100 3 98.40%
pcapkit/foundation 2918 23 1016 25 98.78%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17450 226 4598 191 98.09%
pcapkit/toolkit 872 36 298 10 95.21%
pcapkit/utilities 522 2 158 4 99.12%
pcapkit/vendor 4431 1995 1018 167 51.73%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw
JarryShaw merged commit 11c26b8 into main Oct 20, 2026
60 checks passed
@JarryShaw
JarryShaw deleted the ci/1968-cron-environments branch October 20, 2026 21:57
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 20, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 20, 2026
@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that change CI or workflow configuration (ci: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant