Skip to content

fix(ci): build frontend on runner instead of Oryx - #58

Merged
robgilbreath merged 1 commit into
mainfrom
fix/swa-oryx-node-build
Sep 11, 2026
Merged

robgilbreath merged 1 commit into
mainfrom
fix/swa-oryx-node-build

Conversation

@robgilbreath

Copy link
Copy Markdown
Collaborator

Problem

Frontend deploys have been failing since the 10.10.2 upstream merge:

Error: Platform 'nodejs' version '^22.22.2' is unsupported.
Supported versions: ... 22.20.0, 22.21.1, 22.22.0, ... 24.13.0
Oryx has found build steps, but identified unsupported platform versions. Failing build.

CIPP requires engines.node: ^22.22.2. Oryx — the builder bundled into the Static Web Apps action — tops out at 22.22.0 on the 22.x line, so it refuses the build.

This is not a local misconfiguration: pncit/CIPP package.json is identical to upstream KelvinTegelaar/CIPP. Upstream never hits it because upstream doesn't deploy to SWA, so this surfaces only in forks wired to Static Web Apps.

Impact: the SWA site is still serving the last successful build, so the frontend is pinned at 10.10.1 while the backend has moved to 10.10.2.

Fix

Build on the runner and hand SWA the finished artifact:

  • actions/setup-node (pinned to a SHA, per ci: pin our deploy workflow's action refs), with the version read from package.json rather than hardcoded, so future upstream Node bumps don't re-break this
  • yarn install --frozen-lockfile (repo has yarn.lock, no package-lock.json) then npm run build
  • skip_app_build: true, which per the SWA build-configuration docs makes app_location the pre-built output directory and requires output_location to be empty

This mirrors the approach already used by upstream's own cipp_frontend_build.yml, which doesn't run on forks (if: github.event.repository.fork == false).

Also: Dependabot noise

Adds skip_deploy_on_missing_secrets: true. Dependabot PRs can't read repository secrets by design, so every chore(deps) run has failed with deployment_token was not provided since at least July. That constant red masked this genuine failure. The build still runs on those PRs (so bumps are validated) — only the deploy step is skipped.

Verification

The deploy can't be fully verified until this merges to main, since PR runs deploy to a preview environment rather than production. What this PR's own CI does confirm is the part that was broken: that the build completes on Node 22.22.2 instead of being rejected by Oryx.

🤖 Generated with Claude Code

Oryx (the builder bundled into the Static Web Apps action) only supports
Node up to 22.22.0 on the 22.x line, but CIPP now requires engines.node
^22.22.2. Every deploy since the 10.10.2 merge has failed with:

  Error: Platform 'nodejs' version '^22.22.2' is unsupported.
  Oryx has found build steps, but identified unsupported platform versions.

Build with actions/setup-node instead, reading the version from
package.json so future upstream bumps don't re-break this, then hand the
finished artifact to SWA via skip_app_build. This mirrors the approach
already used by the upstream cipp_frontend_build.yml workflow.

Note that with skip_app_build, app_location becomes the pre-built output
directory and output_location must be empty.

Also sets skip_deploy_on_missing_secrets so Dependabot PRs (which cannot
read repository secrets by design) stop failing with "deployment_token
was not provided". Those runs have been red since at least July and were
masking genuine failures like this one. The build still runs on those
PRs, so dependency bumps are validated; only the deploy is skipped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@robgilbreath
robgilbreath merged commit 3313cde into main Sep 11, 2026
2 checks passed
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