ci: migrate GitHub Actions to Node.js 24 and fix Dockerfile ARG warning#313
Conversation
|
Warning Review limit reached
More reviews will be available in 10 minutes and 43 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
WalkthroughFour CI/CD workflow files update GitHub Actions to newer major versions: ChangesGitHub Actions Dependency Updates
🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly Related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/bug-needs-logs.yml:
- Line 25: Replace the floating tag "actions/github-script@v8" with an immutable
commit SHA to prevent upstream drift; locate the workflow step that contains the
line uses: actions/github-script@v8 and update it to uses:
actions/github-script@<commit-sha> (the specific commit SHA from the
actions/github-script repository) so the workflow pins to a fixed revision.
In @.github/workflows/build-images.yml:
- Line 58: The workflow currently pins marketplace actions using floating tags
like actions/checkout@v5, docker/build-push-action@v7,
actions/upload-artifact@v5, and docker/login-action@v4 (and other `@v`*
occurrences) which should be replaced with immutable commit SHAs; locate each
usage of these actions in .github/workflows/build-images.yml (references:
actions/checkout, docker/build-push-action, actions/upload-artifact,
docker/login-action) and replace the `@vN` tags with the corresponding full commit
SHA from the action's GitHub repo (e.g., actions/checkout@<sha>), updating every
occurrence listed in the comment so the workflow uses exact commit SHAs rather
than floating tags.
In @.github/workflows/ci.yml:
- Line 26: Replace floating major-version action references with their
corresponding full commit SHAs: locate the usages of actions/checkout@v5,
actions/setup-node@v5, and actions/upload-artifact@v5 in the workflow and update
each to the exact commit SHA for the desired release; ensure you test the
workflow after replacing each tag to confirm compatibility and lock the CI to
the reviewed upstream commit.
In @.github/workflows/release.yml:
- Line 22: The workflow uses floating major tags for actions
(actions/checkout@v5 and softprops/action-gh-release@v3); update those uses to
pin to the specific immutable commit SHAs instead of the floating tags: replace
actions/checkout@v5 and softprops/action-gh-release@v3 with their corresponding
full commit SHAs in the release workflow, ensuring you reference the same action
steps (the checkout step and the gh-release step) so the workflow uses fixed
commits and avoids tag drift.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a0e1f794-48ec-4088-a138-869c2515b7f8
📒 Files selected for processing (4)
.github/workflows/bug-needs-logs.yml.github/workflows/build-images.yml.github/workflows/ci.yml.github/workflows/release.yml
Resolves Node.js 20 deprecation warnings by upgrading to action versions that run on Node.js 24.
Upgrade Docker and artifact actions in build-images.yml (and a few others) to versions running on Node.js 24: - docker/build-push-action v5 -> v7 - docker/metadata-action v5 -> v6 - docker/setup-buildx-action v3 -> v4 - docker/login-action v3 -> v4 - actions/upload-artifact(/merge) v4 -> v5 - actions/download-artifact v4 -> v5 - actions/github-script v7 -> v8 - softprops/action-gh-release v1 -> v3
A FROM instruction can only reference a global ARG (one declared before the first FROM). BUILD_FROM was declared after the builder stage's FROM, so it was stage-scoped and undeclared at the final FROM, triggering the UndefinedArgInFrom warning. Move the declaration to the top of the file.
actions/upload-artifact@v5 still defaults to Node.js 20; Node 24 only became the default in v6+. Bump to the latest majors: - actions/upload-artifact(/merge) v5 -> v7 - actions/download-artifact v5 -> v8
Pin every action across all workflows to immutable commit SHAs (with a trailing version comment) to prevent upstream tag drift / tag-hijacking. Also bump enforce-pr-target's github-script v7 -> v8 (Node 24) for consistency, and add a Dependabot config to keep the pinned SHAs updated.
951343a to
30d7716
Compare
What
Resolves the Node.js 20 deprecation warnings across all GitHub Actions workflows, plus a Docker lint warning in the Home Assistant addon.
GitHub Actions → Node.js 24
Bumped every action to a release that runs on the Node.js 24 runtime:
Note:
docker/build-push-actionrequired v7 (v6 is still Node 20). The Node 24 Docker/artifact actions require GitHub Actions Runner v2.327.1+, which GitHub-hosted runners already satisfy.Dockerfile
UndefinedArgInFromfixIn
ha_addon/Dockerfile,ARG BUILD_FROMwas declared after the builder stage'sFROM, making it stage-scoped rather than global. AFROMcan only reference a global ARG (declared before the firstFROM), so the finalFROM ${BUILD_FROM...}triggered theUndefinedArgInFromwarning. Moved the declaration to the top of the file; the default base-image fallback is unchanged.Why
actions/checkout@v4,actions/setup-node@v4, the Docker actions, and the artifact actions all run on Node.js 20, which GitHub is deprecating (forced to Node 24 by June 16th 2026, removed Sept 16th 2026).UndefinedArgInFrom: FROM argument 'BUILD_FROM' is not declared.Summary by CodeRabbit