Update build.yml GitHub Actions to latest versions#1518
Conversation
Upgrade actions/checkout v3→v6, actions/setup-java v3→v5, and migrate from deprecated gradle/gradle-build-action v2 to gradle/actions/setup-gradle v5. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WalkthroughGitHub Actions workflow updated to use newer action versions. Checkout bumped from v3 to v6, setup-java from v3 to v5. Gradle build action replaced with dedicated setup-gradle step (v5), with build execution moved to direct gradle command invocation. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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
🤖 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/build.yml:
- Line 32: Replace the deprecated distribution value used by setup-java v5:
locate the YAML key "distribution: 'adopt'" and change it to "distribution:
'temurin'" so the workflow uses Eclipse Temurin instead of the old AdoptOpenJDK
distribution; verify the surrounding setup-java step (the action for setup-java
v5) still references the correct version and run CI to confirm the job picks up
the new distribution.
| uses: actions/setup-java@v5 | ||
| with: | ||
| java-version: ${{ env.JAVA_VERSION }} | ||
| distribution: 'adopt' |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Migrate distribution from 'adopt' to 'temurin'.
Since you're already upgrading setup-java to v5, this is a good time to address the deprecated distribution. AdoptOpenJDK got moved to Eclipse Temurin and won't be updated anymore. It is highly recommended to migrate workflows from adopt to temurin to keep receiving software and security updates.
Proposed fix
- name: Set up Java
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
- distribution: 'adopt'
+ distribution: 'temurin'📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| distribution: 'adopt' | |
| distribution: 'temurin' |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/build.yml at line 32, Replace the deprecated distribution
value used by setup-java v5: locate the YAML key "distribution: 'adopt'" and
change it to "distribution: 'temurin'" so the workflow uses Eclipse Temurin
instead of the old AdoptOpenJDK distribution; verify the surrounding setup-java
step (the action for setup-java v5) still references the correct version and run
CI to confirm the job picks up the new distribution.
There was a problem hiding this comment.
@shubham1g5 This suggestion about distribution: adopt => distribution: temurin sounds legitimate. I'm not acting on it because I don't have the context to evaluate it, but I wanted to flag it to you in case you want to act on it.
There was a problem hiding this comment.
thanks, think we will be fine updating this as long as it builds successfully i.e I don't think there is a specific reason to use adopt here.
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
Technical Summary
Upgrade GitHub Actions in
build.ymlto their latest versions:actions/checkoutv3 → v6actions/setup-javav3 → v5gradle/gradle-build-actionv2 →gradle/actions/setup-gradlev5 (the old action is deprecated)Safety Assurance
Safety story
CI-only change — no impact on application code. The updated actions are backwards compatible and the build workflow behavior is unchanged.
Automated test coverage
The build workflow itself runs
gradle buildwhich includes all tests and checkstyle. A successful CI run on this PR validates the action upgrades.QA Plan
Special deploy instructions
Rollback instructions
Review
Duplicate PR
Automatically duplicate this PR as defined in contributing.md.
Summary by CodeRabbit