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
sudo access inside the action for apt-get and
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: true input (default)
that installs deps internally, and self-contained: false for users who
manage their own installs.
Acceptance criteria
Related
Deferred from the CI performance optimisation work (PR #TODO) that added
check-trigger as the interim user-facing solution.
Background
Currently, users who adopt git-glimpse must pre-install ffmpeg and Playwright
Chromium in their workflow before the action runs:
As a workaround, we now ship a separate
check-triggeraction that users can runbefore 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()returnsshouldRun = true. Theaction becomes fully self-contained — users need no pre-install steps at all:
The action would handle:
apt-get(or detect if already present)Trade-offs to consider
sudoaccess inside the action forapt-getandplaywright install --with-deps. Works on GitHub-hosted runners; may notwork on all self-hosted runners.
re-installing, so users who pre-install (for caching reasons) aren't penalised.
actions/cache).We could either document the cache pattern or manage it inside the action
using
@actions/tool-cache/@actions/cache.self-contained: trueinput (default)that installs deps internally, and
self-contained: falsefor users whomanage their own installs.
Acceptance criteria
uses: DeDuckProject/git-glimpse@v1producesa recording on a PR with UI changes
installs)
ubuntu-latestGitHub-hosted runnerssudounavailable)Related
Deferred from the CI performance optimisation work (PR #TODO) that added
check-triggeras the interim user-facing solution.