-
Notifications
You must be signed in to change notification settings - Fork 3
Update actions/setup-node action to v6 #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Upgrades the GitHub Actions setup-node action to v6.0.0 across both build and code-quality workflows, ensuring the CI pipeline uses the latest Node setup improvements. Walkthrough
Model: o4-mini | Prompt Tokens: 764 | Completion Tokens: 681 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have prepared friendly suggestions for your code powered by AI. Some insights rely on predictions and may not always be precise, so feel free to pick what suits you best. You are in charge and make the final call, while AI serves as a supportive guide.
Model: o4-mini | Prompt Tokens: 1279 | Completion Tokens: 2486
| - name: Setup Node (PR Summary) | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using a semantic version tag instead of a full commit SHA for actions/setup-node. This improves readability and makes upgrades easier. For example:
- uses: actions/setup-node@v6
with:
node-version-file: source-folder/.tool-versions
cache: npm| run: | | ||
| npm install --frozen-lockfile | ||
| npm run build | ||
| npm prune --omit=dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than running npm prune --omit=dev after install, you can use npm ci --omit=dev for a clean, faster install of only production dependencies:
- run: npm ci --omit=dev| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - name: Setup Node | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checkout and setup-node actions are pinned to commit SHAs. It’s more common to use tagged versions for clarity and easier upgrades. For example:
- uses: actions/checkout@v3
- uses: actions/setup-node@v6
with:
node-version-file: .tool-versions
cache: npm| - name: Checkout source branch | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||
| - name: Setup Node | ||
| uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | ||
| with: | ||
| node-version-file: .tool-versions | ||
| cache: npm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have duplicate checkout and setup-node steps. To DRY up this workflow, you could extract common steps into a reusable workflow or use YAML anchors. For example:
# Define anchors at the top
defaults: &checkout-and-setup
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v6
with:
node-version-file: .tool-versions
cache: npm
# Reuse anchors in jobs
jobs:
pr-lint:
runs-on: ubuntu-latest
<<: *checkout-and-setup
steps:
- run: npm ci
- run: npm run lint
code-scan:
runs-on: ubuntu-latest
<<: *checkout-and-setup
steps:
- run: npm ci
- run: npm run code-scan
This PR contains the following updates:
v5.0.0->v6.0.0Release Notes
actions/setup-node (actions/setup-node)
v6.0.0Compare Source
What's Changed
Breaking Changes
Dependency Upgrades
Full Changelog: actions/setup-node@v5...v6.0.0
Configuration
📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.