tools: make env variables consistent in cron jobs

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65168
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
This commit is contained in:
Antoine du Hamel committed 2026-09-07 11:53:53 +02:00
1 parent 18a7ccf302
commit 67697debdf
5 files changed
+36 -195

No files matched your search

+6 -10
View File
@@ -52,7 +52,7 @@ jobs:
jq -r -s 'reduce .[] as $pr ([]; if index($pr) then . else . + [$pr] end) | join(" ")')
echo "candidates=$candidates" >> "$GITHUB_OUTPUT"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ github.token }}
commitQueue:
needs: get_candidate_prs
if: needs.get_candidate_prs.outputs.candidates != ''
@@ -63,18 +63,14 @@ jobs:
statuses: read
runs-on: ubuntu-slim
steps:
# Install dependencies
- name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install @node-core/utils
run: npm install -g @node-core/utils
- name: Set variables
run: |
echo "REPOSITORY=$(echo "$GITHUB_REPOSITORY" | cut -d/ -f2)" >> "$GITHUB_ENV"
- name: Configure @node-core/utils
run: |
# Keep the config outside the workspace so checkout does not remove it.
@@ -83,7 +79,7 @@ jobs:
ncu-config --global set username "$USERNAME"
ncu-config --global set token "$GH_TOKEN"
ncu-config --global set jenkins_token "$JENKINS_TOKEN"
ncu-config --global set repo "${REPOSITORY}"
ncu-config --global set repo "${GITHUB_REPOSITORY#*/}"
ncu-config --global set owner "${GITHUB_REPOSITORY_OWNER}"
env:
USERNAME: ${{ secrets.JENKINS_USER }}
@@ -102,8 +98,6 @@ jobs:
metadata="${RUNNER_TEMP}/metadata-${pr}.json"
output="${RUNNER_TEMP}/metadata-${pr}.txt"
if git node metadata "$pr" \
--owner "$GITHUB_REPOSITORY_OWNER" \
--repo "$REPOSITORY" \
--readme "$readme" \
--json > "$metadata" 2> "$output"; then
metadata_status=0
@@ -171,7 +165,9 @@ jobs:
- name: Start the Commit Queue
if: steps.get_mergeable_prs.outputs.numbers != ''
run: |
git config --local user.email "github-bot@iojs.org"
git config --local user.name "Node.js GitHub Bot"
ncu-config set token "$GH_TOKEN"
./tools/actions/commit-queue.sh "${GITHUB_REPOSITORY_OWNER}" "${REPOSITORY}" ${{ steps.get_mergeable_prs.outputs.numbers }}
./tools/actions/commit-queue.sh ${{ steps.get_mergeable_prs.outputs.numbers }}
env:
GH_TOKEN: ${{ secrets.GH_USER_TOKEN }}