Skip to content

ci: read secrets from repository environments - #2489

Draft
Pijukatel wants to merge 3 commits into
masterfrom
claude/funny-pascal-qdw288
Draft

Pijukatel wants to merge 3 commits into
masterfrom
claude/funny-pascal-qdw288

Conversation

@Pijukatel

Copy link
Copy Markdown
Collaborator

Description

The org-wide secrets are going away, so every job that reads one now declares the repository environment that holds it, synced from the github-crawlee-python Doppler project:

Environment Secrets Jobs
automation APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN changelog bump (beta and stable release), versioned docs commit, CloudFront invalidation, Playwright and public suffix list updaters
docs APIFY_SIGNING_TOKEN, SEGMENT_TOKEN docs build
e2e-tests APIFY_TEST_USER_API_TOKEN, OPENAI_API_KEY, SLACK_WEBHOOK_URL scheduled e2e tests and their Slack alert
  • The changelog bump uses the apify/actions/python-bump-and-update-changelog action instead of the reusable workflow, since a job that calls a reusable workflow cannot declare an environment.
  • The CloudFront invalidation moves out of deploy_docs into its own job, so github-pages holds no secrets.
  • The factory review uses the apify/actions/factory-review action instead of the reusable workflow, as in ci: read the service account token from repository environments crawlee#4438. Its secrets stay org-level, so it has no environment.

Not changed yet:

  • CODECOV_TOKEN and APIFY_HTTPBIN_TOKEN are read by the PR checks, which can't use environments restricted to protected branches. Whether they stay repo-level secrets is still open.
  • on_schedule_tests.yaml also runs on pull requests that touch the templates or e2e tests. With environment: e2e-tests, those PR runs are refused unless the environment allows the PR branch. How PR runs should behave is still open.

Issues

  • Org-wide GitHub secrets removal (#infra Slack thread)

Testing

  • Workflows parse; actionlint runs in CI.
  • After merge, run a beta release, a docs release, an updater and the scheduled e2e tests from master before the org secrets are removed.

Checklist

  • CI passed

Generated by Claude Code

The org-wide secrets are going away, so every job that reads one now declares
the repository environment that holds it, synced from the `github-crawlee-python`
Doppler project:

- `automation` (`APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN`): the changelog bump of the
  beta and stable releases, the versioned docs commit, the CloudFront
  invalidation and the Playwright and public suffix list updaters.
- `docs` (`APIFY_SIGNING_TOKEN`, `SEGMENT_TOKEN`): the docs build.
- `e2e-tests` (`APIFY_TEST_USER_API_TOKEN`, `OPENAI_API_KEY`,
  `SLACK_WEBHOOK_URL`): the scheduled e2e tests and their Slack alert.

The changelog bump uses the `apify/actions/python-bump-and-update-changelog`
action instead of the reusable workflow, since a job calling a reusable
workflow cannot declare an environment. The CloudFront invalidation moves out
of `deploy_docs` into its own job, so `github-pages` holds no secrets.

The factory review uses the `apify/actions/factory-review` action instead of
the reusable workflow, as in apify/crawlee#4438. Its secrets stay org-level.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAGyh1Z8vh1T4sVRcha
@Pijukatel
Pijukatel requested a review from mtrunkat as a code owner November 20, 2026 10:22
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Nov 20, 2026
@codecov

codecov Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.28%. Comparing base (b257d46) to head (db95ff5).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2489      +/-   ##
==========================================
+ Coverage   94.25%   94.28%   +0.02%     
==========================================
  Files         184      184              
  Lines       13711    13711              
==========================================
+ Hits        12923    12927       +4     
+ Misses        788      784       -4     
Flag Coverage Δ
integration 76.62% <ø> (+0.02%) ⬆️
unit 85.67% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

The `automation`, `docs` and `e2e-tests` environments only hold secrets, so the
jobs using them set `deployment: false` and don't record a deployment per job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAGyh1Z8vh1T4sVRcha
Pull request runs use `e2e-tests-pr`, which requires an approval, and the
scheduled and manual runs on master use `e2e-tests`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ocuAGyh1Z8vh1T4sVRcha

This branch was successfully deployed

1 active (outdated) deployment
e2e-tests — ef3bf43d Deployed Nov 20, 2026 by Pijukatel via End-to-end tests (stagehand, impit, poetry) #407
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants