chore: fix update-nodejs-versions workflow (#3904)
A robot told me this would fix [these
issues](https://github.com/bazel-contrib/rules_nodejs/actions/runs/22607491947/job/65502627549#step:6:41)
because:
Two changes:
- actions/setup-node@v2 → v4 (v2 is very old)
- peter-evans/create-pull-request@v3 → v7 — v3 sets the Authorization
header directly, which conflicts with actions/checkout@v6's new
includeIf-based credential injection,
causing the "Duplicate header" 400 error
diff --git a/.github/workflows/update-nodejs-versions.yml b/.github/workflows/update-nodejs-versions.yml
index 8c00a68..9a6ba21 100644
--- a/.github/workflows/update-nodejs-versions.yml
+++ b/.github/workflows/update-nodejs-versions.yml
@@ -24,14 +24,14 @@
fetch-depth: 0
- name: Setup Node.js
- uses: actions/setup-node@v2
+ uses: actions/setup-node@v4
with:
- node-version: "14.x"
+ node-version: "lts/*"
- uses: pnpm/action-setup@v4
- run: npm run update-nodejs-versions
- name: Create Pull Request
- uses: peter-evans/create-pull-request@v3
+ uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.PAT }}
commit-message: Update Node.js Versions