Skip to content

Action refinement & PR build check#51

Merged
ga111o merged 3 commits intomainfrom
feat/action-refinement
Apr 7, 2026
Merged

Action refinement & PR build check#51
ga111o merged 3 commits intomainfrom
feat/action-refinement

Conversation

@ukleon123
Copy link
Copy Markdown
Contributor

@ukleon123 ukleon123 commented Apr 5, 2026

Summary

  • Upgrade version of action checkout. (v2 -> v4)
  • Scripting PR build check workflow

Motivation

  • Resolve potential action checkout deprecation.
  • To cover and check PR build failure in review step.

Approach

nothing to comment (just build -> check)

Type of Change

  • Bug fix
  • New feature
  • Refactoring
  • Docs / Config
  • CI/CD

Testing

  • Tested locally
  • No regression in existing functionality

Checklist

  • Reviewers assigned
  • Related issue linked

Summary by CodeRabbit

  • Chores
    • Updated CI workflows to use newer workflow components for improved reliability.
    • Added an automatic pull-request build check that runs on PRs and reports failures during review.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0ad5c6bd-503e-4634-8e0d-f5929bcaf100

📥 Commits

Reviewing files that changed from the base of the PR and between 47a001f and b6c64f5.

📒 Files selected for processing (1)
  • .github/workflows/pr-build-check.yaml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/pr-build-check.yaml

📝 Walkthrough

Walkthrough

Updated two existing GitHub Actions workflows to use actions/checkout@v4 and added a new PR build-check workflow that runs on pull request events, sets up Go 1.23.x, downloads modules, builds the project, and comments on PRs when the build fails.

Changes

Cohort / File(s) Summary
Checkout Action Upgrades
​.github/workflows/deploy.yaml, ​.github/workflows/dev.yaml
Bumped the actions/checkout step from v2 to v4; no other workflow steps or settings changed.
New PR Build Verification Workflow
​.github/workflows/pr-build-check.yaml
Added workflow triggered on pull_request (opened, synchronize, reopened) for main and Dev; job checks out code, sets up Go 1.23.x, runs go mod download and go build, and posts a PR review comment when the build fails.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐇 I hopped through YAML, swift and spry,

Bumped checkout steps and watched builds fly.
On PR nights I test and peep —
If builds stumble, I’ll wake you from sleep. 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Action refinement & PR build check' directly summarizes the two main changes: upgrading GitHub Actions (action refinement) and adding a PR build check workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/action-refinement

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/deploy.yaml (1)

22-27: ⚠️ Potential issue | 🔴 Critical

Pre-existing bug: Deploy workflow uses wrong image.

This isn't introduced by this PR, but it's critical: Line 24 sets IMAGE to control_dev:latest while Line 19 builds control_deploy:latest. The production deployment is running the dev image instead of the freshly built deploy image.

🐛 Proposed fix
     - name: Deploy container locally
       run: |
-        IMAGE=${{ secrets.DOCKER_HUB_USERNAME }}/control_dev:latest
+        IMAGE=${{ secrets.DOCKER_HUB_USERNAME }}/control_deploy:latest
         docker stop CONTROL_DEPLOY || true
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deploy.yaml around lines 22 - 27, The deploy workflow sets
IMAGE to the wrong tag (uses control_dev:latest instead of the built
control_deploy:latest); update the IMAGE assignment in the deploy step so it
references the same image name/tag that the build step produces (change
IMAGE=${{ secrets.DOCKER_HUB_USERNAME }}/control_dev:latest to the built image
name control_deploy:latest), ensuring the docker run uses the freshly built
control_deploy:latest image.
🧹 Nitpick comments (1)
.github/workflows/pr-build-check.yaml (1)

18-21: Consider pinning Go version to match go.mod exactly.

The workflow uses 1.23.x while go.mod specifies go 1.23.0 with toolchain go1.23.4. This works since setup-go will install a compatible version, but for reproducibility, consider aligning with the toolchain version.

♻️ Optional: Pin to toolchain version
     - name: Set up Go
       uses: actions/setup-go@v5
       with:
-        go-version: '1.23.x'
+        go-version: '1.23.4'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr-build-check.yaml around lines 18 - 21, The GitHub
Actions step using actions/setup-go@v5 currently pins go-version: '1.23.x' which
is broader than the project's declared toolchain; update the workflow step to
pin the exact toolchain version (e.g., set go-version: '1.23.4') so it matches
the go.mod/toolchain and ensures reproducible builds; modify the step that
references actions/setup-go@v5 and its go-version input accordingly.
🤖 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/pr-build-check.yaml:
- Around line 29-39: The workflow currently posts a review via
github.rest.pulls.createReview with event: 'REQUEST_CHANGES', which accumulates
and can block merging; change the failing-step's createReview call to use event:
'COMMENT' instead (so builds only leave a comment) or alternatively add a new
success-step that lists reviews via github.rest.pulls.listReviews and dismisses
any reviews where review.user.login === 'github-actions[bot]' and review.state
=== 'CHANGES_REQUESTED' using github.rest.pulls.dismissReview with an
explanatory message; update the step name(s) accordingly and ensure the
success-step has if: success() so stale CHANGES_REQUESTED reviews are cleared
when the build passes.

---

Outside diff comments:
In @.github/workflows/deploy.yaml:
- Around line 22-27: The deploy workflow sets IMAGE to the wrong tag (uses
control_dev:latest instead of the built control_deploy:latest); update the IMAGE
assignment in the deploy step so it references the same image name/tag that the
build step produces (change IMAGE=${{ secrets.DOCKER_HUB_USERNAME
}}/control_dev:latest to the built image name control_deploy:latest), ensuring
the docker run uses the freshly built control_deploy:latest image.

---

Nitpick comments:
In @.github/workflows/pr-build-check.yaml:
- Around line 18-21: The GitHub Actions step using actions/setup-go@v5 currently
pins go-version: '1.23.x' which is broader than the project's declared
toolchain; update the workflow step to pin the exact toolchain version (e.g.,
set go-version: '1.23.4') so it matches the go.mod/toolchain and ensures
reproducible builds; modify the step that references actions/setup-go@v5 and its
go-version input accordingly.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 30ba8ede-3d94-424c-8de2-060325d5fc20

📥 Commits

Reviewing files that changed from the base of the PR and between 36c7567 and 47a001f.

📒 Files selected for processing (3)
  • .github/workflows/deploy.yaml
  • .github/workflows/dev.yaml
  • .github/workflows/pr-build-check.yaml

@ga111o
Copy link
Copy Markdown
Member

ga111o commented Apr 6, 2026

헉.. 기존에 v2로 되어있었군요

pr시 빌드 검증 관련해서 좋다고 생각합니다!
빌드가 안되는 무언가를 pr 올리는 경우가 얼마나 있긴 하겠냐만은.. 코드레빗이 말한 것처럼 중복 누적 부분만 확인해주시면 감사하겠습니다!

추가로, 빌드 검증 뿐이라 성능쪽 이슈는 없긴 하겠지만 self hosted runner 말고 github runner 사용한 이유가 따로 있을까요?

Copy link
Copy Markdown
Contributor

@kwonkwonn kwonkwonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 볼때는 큰 문제점 없어보입니다.
@ga111o 코멘트만 확인해주세용

@ukleon123
Copy link
Copy Markdown
Contributor Author

pr시 빌드 검증 관련해서 좋다고 생각합니다! 빌드가 안되는 무언가를 pr 올리는 경우가 얼마나 있긴 하겠냐만은.. 코드레빗이 말한 것처럼 중복 누적 부분만 확인해주시면 감사하겠습니다!

추가로, 빌드 검증 뿐이라 성능쪽 이슈는 없긴 하겠지만 self hosted runner 말고 github runner 사용한 이유가 따로 있을까요?

@ga111o
첫번째 부분 같은 경우에는 다시 생각을 해봤습니다.
확실히, REQUEST_CHANGES 보다는 COMMENT로 처리하는게 나을거 같아서 해당 부분은 수정해놓겠습니다!

두번째 부분은 이전에 방화벽이 꺼져서 액션이 무제한 펜딩되다 꺼지는 일도 있었고,
아직 환경 자체가 온전하진 않다보니 일단 github runner를 사용해서 넣는 것도 나쁘지는 않을 거 같다는 느낌이 들었습니다.
사실, 아직 마이그레이션이 진행 중이기도 하고 해서 좀 안정화되면 그때 self hosted runner로 교체하는 것이 나을 거 같아서 일단 github runner로 설정해두었습니다.

Change Build fail review action 'REQUEST_CHANGES' to 'COMMENT'

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@ukleon123 ukleon123 requested a review from kwonkwonn April 7, 2026 07:16
Copy link
Copy Markdown
Member

@ga111o ga111o left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ga111o ga111o merged commit 01a7311 into main Apr 7, 2026
4 checks passed
@ga111o ga111o deleted the feat/action-refinement branch April 12, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants