Skip to content

infra: give Dependabot PRs a working build check - #330

Open
raymondk wants to merge 1 commit into
mainfrom
infra/dependabot-build-check
Open

infra: give Dependabot PRs a working build check#330
raymondk wants to merge 1 commit into
mainfrom
infra/dependabot-build-check

Conversation

@raymondk

Copy link
Copy Markdown
Collaborator

Summary

Every chore(deps) PR in this repo currently shows a red X, and none of them are actually broken by their dependency bump.

Dependabot-triggered pull_request runs get a read-only GITHUB_TOKEN and no access to repo secrets. preview-deployment.yml dies on its very first step (posting the "🤖 Your PR preview is being built..." comment) with HttpError: Resource not accessible by integration, and would fail again later on secrets.POOL_CONTROLLER_IDENTITY.

Meanwhile build.yml only ran for forks (head.repo.full_name != github.repository). Dependabot branches live in this repo, so they skipped it. Net result: Dependabot PRs had no working build check at all.

Changes

  • build.yml also runs for Dependabot PRs, so they get a real npm run build check.
  • preview-deployment.yml skips Dependabot PRs (cannot succeed there).
  • pr-cleanup.yml skips Dependabot PRs, mirroring the above: no preview canister is ever allocated, so there is nothing to release.

All three use github.event.pull_request.user.login rather than github.actor so the behaviour stays consistent for the whole life of a PR, not just the Dependabot-actored events.

Verified

  • All three workflow files parse and the if: expressions fold to the intended single-line form.
  • npm run build passes on this branch (209 pages).

Dependabot-triggered pull_request runs get a read-only GITHUB_TOKEN and no
access to repo secrets, so preview-deployment.yml fails on its first step
(posting the preview comment) with "Resource not accessible by integration".
build.yml only ran for forks, so Dependabot branches (which live in this repo)
skipped it and had no working check at all: every Dependabot PR showed red
regardless of content.

Route Dependabot PRs to build.yml alongside forks, and skip both
preview-deployment.yml and pr-cleanup.yml for them since no preview canister
is ever allocated.
@raymondk
raymondk requested a review from a team as a code owner July 27, 2026 15:41
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

🤖 Here's your preview: https://z4vwg-raaaa-aaaam-aiiga-cai.icp0.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant