Add lightweight pre-check action for git-glimpse pipeline#15
Merged
DeDuckProject merged 2 commits intomainfrom Mar 12, 2026
Merged
Add lightweight pre-check action for git-glimpse pipeline#15DeDuckProject merged 2 commits intomainfrom
DeDuckProject merged 2 commits intomainfrom
Conversation
Before this change the workflows installed ffmpeg (~94 MB, 100 packages) and Playwright Chromium on every run, even when the trigger config (on-demand / smart mode) would decide to skip the pipeline. Changes: - Add packages/action/src/check.ts: lightweight pre-check entrypoint that evaluates the trigger and writes a `should-run` step output. Mirrors the early logic in index.ts but exits before any heavy work. - Update build script to also compile check.ts → dist/check.js. - demo.yml: run the trigger check immediately after `pnpm install`, then gate ffmpeg, Playwright, app start, and the action itself with `if: steps.check.outputs.should-run == 'true'`. Also adds pnpm store caching and Playwright browser caching. - ci.yml: add pnpm store caching to both jobs, add Playwright browser caching to the integration-tests job. On skipped runs the job now exits after a few seconds of lightweight setup. On cache-hit runs the heavy installs are also significantly faster. https://claude.ai/code/session_014X9H6DRMx8hHT9En1GXDGt
Bug fix: - pnpm/action-setup must run before setup-node with cache: 'pnpm' so that pnpm is on PATH when setup-node tries to locate it for caching. Fixes "Unable to locate executable file: pnpm" error in CI. User-facing: - Add check-trigger/action.yml: a reusable action at DeDuckProject/git-glimpse/check-trigger@v1 that exposes the trigger pre-check to users. They can gate their ffmpeg/Playwright installs on the `should-run` output to skip heavy deps on no-op runs. - Add check-trigger/README.md with full usage documentation and examples including Playwright browser caching tips. - Update demo.yml to use ./check-trigger as a proper `uses:` step (removing the ad-hoc `run: node` step), which also tests the action. Issue tracking: - Add .github/issues/self-contained-action.md with the description for the future work of making the action fully self-contained (no pre-install steps needed from users at all). https://claude.ai/code/session_014X9H6DRMx8hHT9En1GXDGt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new lightweight pre-check entrypoint for the git-glimpse action that runs early in the workflow before heavy dependencies are installed. This allows the pipeline to decide whether to proceed with the full execution, reducing unnecessary resource consumption.
Key Changes
check.tsmodule: Adds a pre-check entrypoint that runs before ffmpeg and Playwright installations to determine if the git-glimpse pipeline should executedist/check.jswith source mapspackage.jsonto compile both the main action and the new check moduleImplementation Details
should-runstep output to control downstream workflow executionhttps://claude.ai/code/session_014X9H6DRMx8hHT9En1GXDGt