Update Node.js version in GitHub Actions workflow#738
Conversation
WalkthroughNode.js version in the GitHub Actions workflow upgraded from 14.x to 18.x. A minor formatting adjustment was made to the docker image tag configuration line. Changes are limited to the workflow file. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/master.yml (1)
42-42: Consider publishing an immutable tag alongsidelatest.Using only
latestmakes rollback and provenance harder after successive pushes tomaster. Adding${{ github.sha }}as a second tag keeps each image addressable without changing the current pull flow.Example
- tags: jembi/openhim-console:latest + tags: | + jembi/openhim-console:latest + jembi/openhim-console:${{ github.sha }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/master.yml at line 42, The workflow currently only pushes the Docker tag "jembi/openhim-console:latest"; add an immutable tag using the commit SHA so images are addressable and rollbacks are possible by including a second tag like "jembi/openhim-console:${{ github.sha }}" alongside the existing tags configuration in the jobs that define tags (the existing tags entry should list both jembi/openhim-console:latest and jembi/openhim-console:${{ github.sha }}).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/master.yml:
- Line 16: The workflow defines an unused matrix entry "node-version" but never
references it; either remove the node-version matrix key from the GitHub Actions
workflow or update the Dockerfile and workflow to use the matrix value. To fix:
if you want to keep the matrix, change the Dockerfile FROM line from "FROM
node:18-alpine" to a supported image (e.g., node:24-alpine) and add a setup step
or interpolation that uses "${{ matrix.node-version }}" (or reference the matrix
when building the Docker image) so the matrix is actually used; otherwise simply
delete the "node-version" matrix entry from the workflow to remove the unused
configuration. Ensure you update any CI steps that build the image or reference
node to use the same node version symbol ("node-version" / FROM node:<version>)
so they remain consistent.
---
Nitpick comments:
In @.github/workflows/master.yml:
- Line 42: The workflow currently only pushes the Docker tag
"jembi/openhim-console:latest"; add an immutable tag using the commit SHA so
images are addressable and rollbacks are possible by including a second tag like
"jembi/openhim-console:${{ github.sha }}" alongside the existing tags
configuration in the jobs that define tags (the existing tags entry should list
both jembi/openhim-console:latest and jembi/openhim-console:${{ github.sha }}).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: c934e40b-bf88-46c0-8e5f-b51fda101703
📒 Files selected for processing (1)
.github/workflows/master.yml
| strategy: | ||
| matrix: | ||
| node-version: [14.x] | ||
| node-version: [18.x] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify that the matrix value is unused and the image build still pins Node 18.
rg -nC2 'node-version|matrix\.node-version|setup-node' .github/workflows/master.yml
sed -n '1,5p' DockerfileRepository: jembi/openhim-console
Length of output: 230
Remove the unused matrix entry or add the corresponding Dockerfile update.
The node-version matrix on Line 16 is declared but never referenced in the workflow (no ${{ matrix.node-version }} or setup-node step exists). The build still uses FROM node:18-alpine from the Dockerfile, which is EOL. Either remove this unused matrix configuration or, if the intent is to upgrade Node, update the Dockerfile to a supported version (e.g., 24.x) and wire it into the workflow.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/master.yml at line 16, The workflow defines an unused
matrix entry "node-version" but never references it; either remove the
node-version matrix key from the GitHub Actions workflow or update the
Dockerfile and workflow to use the matrix value. To fix: if you want to keep the
matrix, change the Dockerfile FROM line from "FROM node:18-alpine" to a
supported image (e.g., node:24-alpine) and add a setup step or interpolation
that uses "${{ matrix.node-version }}" (or reference the matrix when building
the Docker image) so the matrix is actually used; otherwise simply delete the
"node-version" matrix entry from the workflow to remove the unused
configuration. Ensure you update any CI steps that build the image or reference
node to use the same node version symbol ("node-version" / FROM node:<version>)
so they remain consistent.
Summary by CodeRabbit