Skip to content

Commit 9c9a53b

Browse files
mydeaclaude
andcommitted
fix(ci): Include Dockerfile hash in Playwright image tag
The image tag was only based on the Playwright version, so changes to the Dockerfile (e.g. adding yarn, system deps) didn't trigger a rebuild. Tag is now `v<playwright-version>-<8-char-dockerfile-hash>`, e.g. `v1.56.0-a1b2c3d4`. Any change to the Dockerfile produces a new tag, which misses the GHCR cache and triggers a fresh build. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2c9a23b commit 9c9a53b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/actions/ensure-playwright-image/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ runs:
6666
6767
- name: Set image reference
6868
id: image
69-
run:
70-
echo "ref=ghcr.io/${{ github.repository }}/playwright:v${{ steps.playwright.outputs.version }}" >>
71-
$GITHUB_OUTPUT
7269
shell: bash
70+
run: |
71+
DOCKERFILE_HASH=$(sha256sum .github/docker/playwright.Dockerfile | cut -c1-8)
72+
TAG="v${{ steps.playwright.outputs.version }}-${DOCKERFILE_HASH}"
73+
echo "ref=ghcr.io/${{ github.repository }}/playwright:${TAG}" >> $GITHUB_OUTPUT
7374
7475
- name: Check if image already exists
7576
id: check

0 commit comments

Comments
 (0)