Skip to content

Skip unnecessary rebuilds when no dependencies changed#100

Merged
mraible merged 1 commit into
mainfrom
skip-unnecessary-rebuilds
Feb 10, 2026
Merged

Skip unnecessary rebuilds when no dependencies changed#100
mraible merged 1 commit into
mainfrom
skip-unnecessary-rebuilds

Conversation

@mraible
Copy link
Copy Markdown
Contributor

@mraible mraible commented Feb 10, 2026

The weekly rebuild workflow runs install and build even when no dependencies have changed. While the build output for this repo is deterministic, the unnecessary install+build cycle wastes CI time.

This adds an early git-based check that compares the last commit touching dependency files (package.json, package-lock.json) against the last commit touching the dist directory. If no dependency files changed since the last rebuild, the install, build, commit, and PR steps are all skipped.

The check runs before npm ci, so it adds ~1s of git commands instead of the full install+build cycle when unnecessary. Manual triggering via workflow_dispatch still works normally.

@mraible mraible requested a review from a team February 10, 2026 19:43
Add a check step to the rebuild workflow that compares the last commit
touching dependency files against the last dist build commit. If no
dependency files changed since the last rebuild, all subsequent steps
are skipped, avoiding unnecessary install and build cycles.
@mraible mraible force-pushed the skip-unnecessary-rebuilds branch from 4ab17ed to fecd045 Compare February 10, 2026 19:52
@mraible mraible merged commit bbb39aa into main Feb 10, 2026
18 checks passed
@mraible mraible deleted the skip-unnecessary-rebuilds branch February 10, 2026 22:15
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.

2 participants