Skip to content

CI hardening: PR build, pinned actions, wasm image, lint, Renovate - #9

Merged
Kinflou merged 1 commit into
mainfrom
ci-hardening
Nov 12, 2026
Merged

Kinflou merged 1 commit into
mainfrom
ci-hardening

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Phase 4 of the org CI overhaul for the tutorial.

What changed

  • deploy.yml:
    • The site now builds on every pull request (it only ran on pushes to main). The build job runs on PRs and pushes; the Pages artifact upload and the deploy job are gated to pushes to main.
    • The build job runs in the ci-wasm image (by digest), which has cargo, wasm-bindgen 0.2.127 and wasm-opt for comline-simulator's prepack WASM build; it needs no installs.
    • Node 24.22.3 (was 24) through SHA-pinned setup-node; corepack enable provides yarn, which hands over to the committed Yarn 4.18.0. cache: yarn is replaced by an explicit cache of ~/.yarn/berry/cache (Yarn's global cache, which holds the built simulator archive), since setup-node's cache needs yarn before Node exists in the container.
    • All actions pinned by SHA with version comments, runs-on: ubuntu-24.04, timeout-minutes, top-level permissions: contents: read, persist-credentials: false.
    • pages: write and id-token: write on the deploy job only, with harden-runner (audit) there. The build job is a container job, where harden-runner doesn't work.
    • Concurrency is keyed on workflow and ref and cancels in-progress runs on PRs only; a deploy already running is never cancelled.
  • New lint.yml (the org's reusable lint) and renovate.json extending the org preset, which already covers npm and GitHub Actions. This repo adds: the simulator git pin stays manual, and npm updates wait 3 days so they respect Yarn's npmMinimalAgeGate (one day by default in 4.18; not overridden).

What stayed as it was, and why

  • COMLINE_SIMULATOR_SCRIPT: '0' (the tutorial only needs the lean sim), and yarn install without --immutable (the sim's WASM isn't byte-reproducible; checksumBehavior: update).
  • The unit and Playwright tests are not run in CI. The Playwright test is still the SvelteKit template's and needs a browser; adding them is a separate change.

Verified on this PR

build_site is green: the simulator's WASM is built during install, then yarn build. Lint and CodeQL are green. deploy is skipped, as it should be on a PR.

Only verifiable after merge

The first push to main runs the real upload-pages-artifact and deploy-pages (new SHAs).

@Kinflou
Kinflou marked this pull request as ready for review November 12, 2026 01:00
@Kinflou
Kinflou merged commit 9929a63 into main Nov 12, 2026
7 checks passed
@Kinflou
Kinflou deleted the ci-hardening branch November 12, 2026 01:00
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