Updating CI
Pin the Action to the floating major @v2 to receive compatible updates automatically.
Don't pin to
@main. Older setup docs suggested it, but@mainruns unreleased code that can change or break without warning. Switch to the floating major@v2.
Upgrade with the CLI
Upgrade the workflow to the current Action major:
npx react-doctor@latest ci upgradeAdd --pr to open the upgrade as a pull request. Use react-doctor ci config when you want to change the gate, scope, or reporting without upgrading the Action.
Get updates automatically (recommended)
There are two ways to pin the Action to the floating major @v2:
Bump a pinned version
A commit or exact-tag pin doesn't update until you change it. Both of these are frozen pins:
- uses: millionco/react-doctor@e3f0a1c2b4d5968778899aabbccddeeff0011223 # a commit
- uses: millionco/react-doctor@v2.3.1 # an exact tagA commit is the supply-chain-hardened pin; an exact tag is the readable version of the same idea. To update either, swap in the newer commit or tag from the releases page, and follow the migration guide across a major. Or skip the manual bumps and let Dependabot do them for you. If you don't need a frozen version, switch to @v2 and drop the upkeep entirely.
Let Dependabot do it
To keep a hash or exact-tag pin current without tracking releases by hand, add .github/dependabot.yml:
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weeklyDependabot opens a PR bumping the pinned Action after each new release.
Updating the scanner
The @… ref pins the Action. A separate version input pins the scanner it runs, the react-doctor npm package. It defaults to latest:
- uses: millionco/react-doctor@v2
with:
version: "0.7.7"Leave it on latest for the newest rules, or pin it to freeze the engine independently of the Action. See the Action reference.