|
| 1 | +# Pre-baked runner image for `qa.py`. Inherits catthehacker (the standard |
| 2 | +# act runner image — has node/npm/python/git/jq/sudo all configured the way |
| 3 | +# act expects), then bakes Playwright + chromium on top so we don't pay |
| 4 | +# the 3-minute install cost on every local act run. |
| 5 | +# |
| 6 | +# Built multi-arch (amd64 + arm64) by .github/workflows/build-image.yml in |
| 7 | +# this repo, published to ghcr.io/pagerguild/qa-cli/runner:latest. The wrapper |
| 8 | +# pins to a digest, not :latest, so cache-busting is explicit. |
| 9 | +# |
| 10 | +# Local override during dev: `docker build -t qa-cli/runner:local .` and pass |
| 11 | +# `--runner-image qa-cli/runner:local` to qa.py. |
| 12 | + |
| 13 | +FROM catthehacker/ubuntu:act-latest |
| 14 | + |
| 15 | +# Auto-link the published GHCR package to this repo so visibility flips |
| 16 | +# (private → public) appear in pagerguild/qa's package UI. |
| 17 | +LABEL org.opencontainers.image.source=https://github.com/pagerguild/qa |
| 18 | + |
| 19 | +# Pin Playwright to a known-good version. Bump in lockstep with whatever the |
| 20 | +# personas expect; the chromium binary version is tied to the Playwright |
| 21 | +# release. Re-bake the image when this changes. |
| 22 | +ARG PLAYWRIGHT_VERSION=1.49.1 |
| 23 | + |
| 24 | +RUN set -eux; \ |
| 25 | + npx -y playwright@${PLAYWRIGHT_VERSION} install --with-deps chromium; \ |
| 26 | + CHROME_BIN=$(find /root/.cache/ms-playwright -path '*/chromium-*/chrome-linux*/chrome' -type f | head -1); \ |
| 27 | + test -n "$CHROME_BIN"; \ |
| 28 | + ln -sf "$CHROME_BIN" /usr/bin/chromium; \ |
| 29 | + test -x /usr/bin/chromium; \ |
| 30 | + echo "baked $CHROME_BIN → /usr/bin/chromium" |
| 31 | + |
| 32 | +# Reset to the entrypoint catthehacker expects so act's container lifecycle |
| 33 | +# (tail -f /dev/null then docker exec) keeps working. |
| 34 | +ENTRYPOINT [] |
| 35 | +CMD ["bash"] |
0 commit comments