Ensure that the Playwright version in GitHub Actions container matches the one referenced in the CLI - #7
Merged
Conversation
A run pinned to `humanmade/wp-pattern-library@v0.2.0` failed launching Chromium. The action ref and the code it runs were selected by two independent mechanisms — the `version` input defaulted to `latest`, so that pin ran CLI 0.4.0, whose Playwright resolved to 1.63.0, against a workflow container holding 1.62.1. Remove both seams rather than police them. The CLI version now defaults to the ref the action was used at, read from `github.action_ref`, so `@v0.4.1` runs CLI 0.4.1 and the pair cannot drift. A branch or commit ref has no version to read and falls back to `latest`, which is today's behaviour. Chromium is then installed from that resolved tree, so it matches the Playwright the CLI will actually load. A container image stops being a correctness requirement and becomes what its comment always claimed: an optimisation. The boilerplate and the docs drop it accordingly. The remaining sync points get checks in the `versions` CI job: the action pins in README, docs and examples must name the current release — the manual `git grep` CONTRIBUTING asked for — and the manifest version the plugin writes must be the one the CLI reads, which until now surfaced only as a failed run in a consumer's repository. Also pass `output-path` through the environment rather than interpolating it into the script, per the reasoning already recorded two lines above it, and bring package-lock.json's stale 0.3.0 forward. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VwgCPG1eRvXtWcgGEr32fG
kadamwhite
approved these changes
Sep 10, 2026
| ## Chromium | ||
|
|
||
| The action installs Chromium itself, matched to the Playwright version the CLI | ||
| resolves. Nothing to configure, and nothing that goes stale. |
Contributor
There was a problem hiding this comment.
Do we need to bump this in our consuming projects every time chromium updates? That feels clunky, but I'm probably misunderstanding
Collaborator
Author
There was a problem hiding this comment.
No, this way we just need to remove the "container" from the consuming workflow.
Previously I was using container: mcr.microsoft.com/playwright:v1.62.1-noble which came with its own versions of Playwright and Chromium. This saved a minute or so installing those dependencies on the container, but it made the version of the action tightly coupled to container specified in the workflow that calls it.
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.
Removes the hardcoded browser path in the action script, which would fail whenever the latest Chromium doesn't match the version in the Playwright container.
Also updates a number of other pieces of the plugin architecture to ensure that the version of the node script being run matches the GH Action tags, as well as the plugin version if possible.
This is slightly slower, because the CI workflow has to install the correct version of Chromium; but it is much more stable and won't break or require updating the action config every time a new version is released.
Bumps the version number to 0.4.1