ci: skip secret-consuming live jobs on Dependabot PRs#698
Conversation
Dependabot PRs branch from this repo, so the existing fork gate (`head.repo.full_name == github.repository`) is TRUE for them and the live integration / e2e jobs run. But Dependabot PRs execute under the *Dependabot* secret store, which is a separate, narrower set than the Actions secrets — it carries the `CS_*` credentials but not the identity suites' `CLERK_MACHINE_TOKEN`. The lock-context integration suite throws (by design — "fail, never skip", so a green skip can't hide a regression) when that token is missing, so every Dependabot PR that touches an integration trigger path hard-fails a job the bot cannot fix (e.g. #689, a dev-dependency bump touching `packages/test-kit/**`). Give Dependabot PRs the same clean skip fork PRs already get, by adding `github.actor != 'dependabot[bot]'` to the job gate on all five secret-consuming workflows (integration-drizzle / -supabase / -prisma-next, prisma-next-e2e, prisma-example-readme-e2e). A skipped required job reports success, so the PR is no longer blocked; `tests.yml` + the frozen-lockfile checks remain the real signal for a dependency bump. Not running live, secret-backed jobs on semi-trusted Dependabot PRs is also the supply-chain-safer default. Claude-Session: https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughGitHub Actions integration and end-to-end jobs now skip Dependabot pull request runs while continuing to run for pushes and eligible same-repository pull requests. The Supabase workflow also documents fork and Dependabot secret restrictions. ChangesCI workflow gating
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing — wrong approach. Rather than skipping live jobs on Dependabot PRs (which changes the security posture), the dependency bump in #689 will be re-authored as a maintainer PR so it runs under the normal Actions CI context. |
Problem
Dependabot PRs (e.g. #689, a dev-dependency bump) hard-fail the live integration jobs, blocking them on something Dependabot can't fix.
Dependabot branches live in this repo, so the existing fork gate —
github.event.pull_request.head.repo.full_name == github.repository— istruefor them, and the secret-consuming live jobs run. But Dependabot PRs execute under the Dependabot secret store, a separate/narrower set than Actions secrets: it carriesCS_*but not the identity suites'CLERK_MACHINE_TOKEN. Thelock-contextintegration suite is deliberately fail-not-skip (a green skip could hide a regression), so it throws when the token is absent — and the wholeDrizzle v3 integrationjob goes red on a change Dependabot cannot fix. #689 tripped it because the bump touchespackages/test-kit/**, an integration trigger path.Fix
Give Dependabot PRs the same clean skip fork PRs already get: add
github.actor != 'dependabot[bot]'to the job-level gate on all five secret-consuming workflows:integration-drizzle.ymlintegration-supabase.ymlintegration-prisma-next.ymlprisma-next-e2e.ymlprisma-example-readme-e2e.ymlA skipped required job reports success, so the PR is no longer blocked;
tests.yml+ the frozen-lockfile / OSV checks remain the real signal for a dependency bump. Not running live, secret-backed jobs on semi-trusted Dependabot PRs is also the supply-chain-safer default (aligns with the repo's supply-chain controls).After merge
@dependabot rebaseon #689 (and future Dependabot PRs) so its run picks up the updated gate and the live jobs skip cleanly.Notes
github.actoris neverdependabot[bot]on a push tomain).https://claude.ai/code/session_01MxTTPaPP16m6br7Hoab94w
Summary by CodeRabbit