October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk4 min

How to Update the Chromatic CLI in a GitHub Actions Workflow

Update Chromatic in GitHub Actions by choosing an action tag—or manage the CLI version directly through your project’s package dependency and lockfile.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To update Chromatic in GitHub Actions, change the version tag on the action’s uses line—for example, chromaui/action@latest to chromaui/action@vX or a fixed chromaui/[email protected]. The action typically upgrades the CLI automatically; the tag determines how updates are selected. If your workflow runs npx chromatic directly instead, install Chromatic as a project development dependency to control its version through your package manifest and lockfile.

Update the version tag in the GitHub Action

Open the workflow file that runs Chromatic, usually under .github/workflows/, and find the step that uses chromaui/action. Change only the tag after the @ to choose an update policy. Chromatic’s GitHub Actions documentation says the action typically auto-upgrades the CLI.

- name: Run Chromatic
  uses: chromaui/action@vX
  with:
    projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

Replace vX with the major version you intend to follow. To pin a specific release, use a complete tag such as chromaui/[email protected]. Chromatic’s examples include v10 and v10.0.0 to illustrate tag formats; they are not a recommendation for the latest release.

Choose how updates should reach CI

Tag pattern Update behavior Useful when
@latest Follows all new updates. You want new updates automatically.
@vX Receives features and bug fixes within the chosen major version while avoiding breaking changes from a new major version. You want updates within a major line without automatically crossing to another major.
@vX.Y.Z Stays on the specific version until you deliberately change the workflow tag. You want version changes to happen through explicit workflow edits.

A fixed tag reduces surprise from an automatic version change, but it also means someone must revisit it so CI does not remain on an old release unnoticed.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the surrounding workflow before committing

Changing the action tag does not require restructuring the workflow. Check that the existing setup still matches the project and Chromatic’s documented setup:

  • Checkout: Chromatic’s GitHub Actions example uses actions/checkout with fetch-depth: 0.
  • Node and dependencies: Keep the project’s existing Node version and package-manager installation process consistent with its lockfile.
  • Project token: Store the token as a GitHub Actions repository secret and reference it as ${{ secrets.CHROMATIC_PROJECT_TOKEN }}. Do not put the token value in committed YAML.
  • Trigger: Chromatic recommends running the step on push. Its documentation warns that a pull_request trigger can, in some circumstances, cause lost baselines or an unexpected baseline from main. Treat trigger changes separately from changing the version tag.

These setup details and the trigger caveat are covered in Chromatic’s GitHub Actions guide.

If the workflow runs npx chromatic directly

This is a different version-control path from chromaui/action. If the project does not have chromatic installed as a dependency, npx chromatic downloads and runs the latest version. To make the CLI version follow the project’s dependency manifest and lockfile, add it as a development dependency using the project’s package manager. Chromatic lists these commands in its CLI documentation:

  • npm install chromatic --save-dev
  • yarn add --dev chromatic
  • pnpm add --save-dev chromatic

Commit the resulting manifest and lockfile changes, then keep using the project’s normal dependency-install step in CI. Chromatic recommends installing the package when pairing the CLI with Vitest, Playwright, or Cypress so it stays in sync with the corresponding Chromatic test package. That recommendation is not a requirement for every basic Storybook workflow.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the change

  1. Edit the uses tag in the Chromatic workflow, or add the CLI as a development dependency if the workflow invokes it directly.
  2. Preserve the repository secret reference and the workflow’s existing checkout, Node, and dependency setup.
  3. Commit the workflow or dependency changes and run the workflow using its normal trigger.
  4. Review the GitHub Actions log for the Chromatic step and confirm it completes. If it fails, use the error and setup checks below rather than changing the trigger and version policy at the same time.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting

The CLI version did not change as expected

Check which mechanism the workflow uses. For chromaui/action, the tag on the uses line selects the policy. For direct npx chromatic without a project dependency, npx runs the latest version; install Chromatic as a development dependency if the project should control the version through its lockfile.

The action cannot authenticate

Confirm that the repository has a GitHub Actions secret named CHROMATIC_PROJECT_TOKEN and that the workflow references it as ${{ secrets.CHROMATIC_PROJECT_TOKEN }}. Keep the token itself out of the YAML file and commit history.

The workflow has baseline problems

Review the trigger separately from the version update. Chromatic recommends push; its GitHub Actions documentation notes that pull_request can produce unexpected baseline behavior in some circumstances. See Chromatic’s trigger guidance.

The workflow fails during checkout or dependency setup

Compare the workflow with the project’s normal CI setup: ensure checkout fetches full history with fetch-depth: 0 where needed, Node matches the project, and dependencies are installed with the package manager and lockfile the repository actually uses. Updating the action tag alone does not replace those setup steps.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Or skip the browser setup

For website screenshots rather than Chromatic visual testing, ScreenshotNeo offers a screenshot API and MCP server. One GET request can return a screenshot or PDF; its documentation is at screenshotneo.com/docs.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Cookie banners, popups, and chat widgets are removed before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000. Sign up for free.

Frequently Asked Questions

Can I use a full version number for the Chromatic GitHub Action?

Yes. Use a tag in the form chromaui/[email protected] to pin a specific version.

Does changing the Chromatic action tag require changing the workflow trigger?

No. The version tag and trigger are separate workflow choices.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. Shenzhen desk3 min
    HONOR Expands Beyond Smartphones With Humanoid Robot RevealHONOR said it unveiled its first humanoid robot at MWC 2026 and named shopping assistance, workplace inspections, and supportive companionship as intended uses. Later Robotics D1 claims and a reported…
  2. Cupertino desk5 min
    Apple Unveils AirPods Max 2: The Upgrade That Should Have Happened Years AgoAirPods Max 2 adds H2-powered audio features and Apple claims up to 1.5× more effective ANC, but its design, Smart Case, and 20-hour battery rating are unchanged. Wired lossless audio…
  3. Cupertino desk4 min
    Apple’s OLED Touch MacBooks Are Coming—but the Dynamic Island Is the Real GambleApple has not announced an OLED touchscreen MacBook, but reports point to high-end models arriving in late 2026 or early 2027. The reported Mac Dynamic Island could be useful, but…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.