-
Notifications
You must be signed in to change notification settings - Fork 317
Description
Problem
The hourly-ci-cleaner workflow was failing because it tries to run npm ci without having Node.js set up first. While Node.js is set up at the beginning of the job (line 42), it's needed again after the CI status check step runs.
Root Cause
The workflow has this sequence:
- Setup Node.js (early in job)
- Check CI status - exits with code 1 if CI is passing
- Install Make
- Setup Go
- Install npm dependencies ← FAILS because Node.js setup is before the conditional exit
When CI is failing, step #2 continues, but there's no Node.js setup between the conditional check and the npm install.
Fix
Added the setup-node action before the "Install npm dependencies" step to ensure Node.js is available when needed. This matches the pattern used in other workflows like ci-coach.md.
Changes
- Added
setup-node@v6action with Node 24 and npm caching - Positioned it between "Setup Go" and "Install npm dependencies" steps
- Uses the same configuration as the main CI workflow
Testing
The workflow should now be able to:
- Check CI status
- If failing, set up build tools (Make, Go, Node.js)
- Install dependencies successfully
- Run the CI cleaner agent
Note
This commit only updates the .md file. The .lock.yml file needs to be regenerated by running make recompile, which requires a working build environment.
AI generated by Hourly CI Cleaner
Note
This was originally intended as a pull request, but the git push operation failed.
Workflow Run: View run details and download patch artifact
The patch file is available as an artifact (aw.patch) in the workflow run linked above.
To apply the patch locally:
# Download the artifact from the workflow run https://github.com/githubnext/gh-aw/actions/runs/20279579492
# (Use GitHub MCP tools if gh CLI is not available)
gh run download 20279579492 -n aw.patch
# Apply the patch
git am aw.patchShow patch (34 lines)
From e7260d820f78f4474367bc9f8cd15cbbdb5dd323 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Tue, 16 Dec 2025 19:11:43 +0000
Subject: [PATCH] fix: Add Node.js setup step to hourly-ci-cleaner workflow
The hourly-ci-cleaner workflow was missing the setup-node action,
which caused npm ci to fail since Node.js was not available. This
adds the setup-node action with Node 24 and npm caching, matching
the configuration used in the main CI workflow.
---
.github/workflows/hourly-ci-cleaner.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/.github/workflows/hourly-ci-cleaner.md b/.github/workflows/hourly-ci-cleaner.md
index 474100b..6b7b26e 100644
--- a/.github/workflows/hourly-ci-cleaner.md
+++ b/.github/workflows/hourly-ci-cleaner.md
@@ -52,6 +52,12 @@ steps:
with:
go-version-file: go.mod
cache: true
+ - name: Setup Node.js
+ uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
+ with:
+ node-version: "24"
+ cache: npm
+ cache-dependency-path: pkg/workflow/js/package-lock.json
- name: Install npm dependencies
run: npm ci
working-directory: ./pkg/workflow/js
--
2.34.1