-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Background
Currently, users who adopt git-glimpse must pre-install ffmpeg and Playwright
Chromium in their workflow before the action runs:
- name: Install FFmpeg
run: sudo apt-get install -y ffmpeg
- name: Install Playwright Chromium
run: npx playwright install chromium --with-deps
- uses: DeDuckProject/git-glimpse@v1
...As a workaround, we now ship a separate
check-trigger action that users can run
before their installs to skip them when the pipeline won't execute. But this
still requires users to structure their workflow correctly and understand the
pattern.
Proposed improvement
Move the ffmpeg and Playwright installs into packages/action/src/index.ts,
running them only after evaluateTrigger() returns shouldRun = true. The
action becomes fully self-contained — users need no pre-install steps at all:
# User workflow becomes just:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DeDuckProject/git-glimpse@v1
with:
config-path: git-glimpse.config.ts
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}The action would handle:
- Evaluate trigger → if SKIP, exit immediately (fast, no heavy installs)
- If RUN → install ffmpeg via
apt-get(or detect if already present) - Install Playwright Chromium if not already installed
- Run the pipeline
Trade-offs to consider
- Requires
sudoaccess inside the action forapt-getand
playwright install --with-deps. Works on GitHub-hosted runners; may not
work on all self-hosted runners. - We should detect whether ffmpeg/Playwright are already installed and skip
re-installing, so users who pre-install (for caching reasons) aren't penalised. - Browser caching is currently the user's responsibility (via
actions/cache).
We could either document the cache pattern or manage it inside the action
using@actions/tool-cache/@actions/cache. - We may want to keep both options: a
self-contained: trueinput (default)
that installs deps internally, andself-contained: falsefor users who
manage their own installs.
Acceptance criteria
- A minimal workflow with only
uses: DeDuckProject/git-glimpse@v1produces
a recording on a PR with UI changes - When the trigger check skips, the job completes in < 30 seconds (no heavy
installs) - Works on
ubuntu-latestGitHub-hosted runners - Documented behaviour for self-hosted runners (graceful error or skip if
sudounavailable)
Related
Deferred from the CI performance optimisation work (PR #TODO) that added
check-trigger as the interim user-facing solution.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels