Updating CI
We recommend pinning the Action to the floating major @v2, which updates to new releases automatically.
Don't pin to
@main. Older setup docs suggested it, but we no longer recommend it:@mainruns unreleased code that can change or break without warning. Switch to the floating major@v2.
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.2.18"Leave it on latest for the newest rules, or pin it to freeze the engine independently of the Action. See the Action reference.