fix(ci): standardize GitHub Actions and Node.js versions (#2169)

Update pr-risk.yml and ai-triage.yml to match the versions used by all
other CI workflows:
- actions/checkout@v4 → @v6
- actions/setup-node@v4 → @v6
- node-version: '20' → '24'

Also fix unquoted $GITHUB_OUTPUT references in pr-risk.yml shell blocks
to prevent word-splitting issues.
This commit is contained in:
Juan Francisco Lebrero 2026-03-23 12:48:01 -03:00 committed by GitHub
parent efebd29857
commit eb48a7cdde
2 changed files with 8 additions and 8 deletions

View file

@ -14,7 +14,7 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
sparse-checkout: |
VISION.md

View file

@ -19,14 +19,14 @@ jobs:
steps:
# Checkout the BASE branch — our trusted script and map, not fork code.
- name: Checkout base
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
ref: ${{ github.base_ref }}
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: '20'
node-version: '24'
# Use the GitHub API to get changed files — no fork code is executed.
- name: Get changed files
@ -44,14 +44,14 @@ jobs:
id: risk
run: |
REPORT=$(cat /tmp/changed-files.txt | node scripts/pr-risk-check.mjs --github || true)
echo "report<<EOF" >> $GITHUB_OUTPUT
echo "$REPORT" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "report<<EOF" >> "$GITHUB_OUTPUT"
echo "$REPORT" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
RISK_LEVEL=$(cat /tmp/changed-files.txt | node scripts/pr-risk-check.mjs --json 2>/dev/null \
| node -e "let d=''; process.stdin.on('data',c=>d+=c); process.stdin.on('end',()=>{ try { console.log(JSON.parse(d).risk) } catch { console.log('low') } })" \
|| echo "low")
echo "level=$RISK_LEVEL" >> $GITHUB_OUTPUT
echo "level=$RISK_LEVEL" >> "$GITHUB_OUTPUT"
- name: Write step summary
run: echo "${{ steps.risk.outputs.report }}" >> $GITHUB_STEP_SUMMARY