Skip to content

ㄴㅁㄹ#1

Closed
ukleon123 wants to merge 6 commits into
Devfrom
main
Closed

ㄴㅁㄹ#1
ukleon123 wants to merge 6 commits into
Devfrom
main

Conversation

@ukleon123
Copy link
Copy Markdown
Owner

Summary

Motivation

Approach

Type of Change

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

Related Issue

Testing

  • Tested locally
  • No regression in existing functionality

Checklist

  • Reviewers assigned
  • Related issue linked

charlie3965 and others added 6 commits March 19, 2026 17:29
Updated the deployment workflow to use the control_dev image and added environment variables for the container.
* file change : api

* migrate ambigious directory name request into client

* Add pkg directory for containing lower bound dependancy-free packages (easy-cloud-Knet#42)

Merge pkg structure migration to Control logic.

None of functional changes has applied but, structural refactoring for reduce of dependency  has been applied.

* resolve previous build error

---------

Co-authored-by: wind5052 <wind5052@naver.com>
Co-authored-by: Minhyeok <ga111o@proton.me>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a GitHub Actions workflow to verify PR builds and updates the existing deploy workflow’s container run configuration.

Changes:

  • Added a new PR workflow (pr-check.yaml) to run go mod download + go build, and request changes on failure.
  • Updated the deploy workflow to run a container with different image tag/port mapping and additional environment variables.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/pr-check.yaml New PR build verification workflow, including a failure review comment step.
.github/workflows/deploy.yaml Adjusts container image reference and expands docker run args (ports, env vars, host mapping).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +13 to +38
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'

- name: Download Go modules
run: go mod download

- name: Build
run: go build -o main .

- name: Comment on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'REQUEST_CHANGES',
body: 'Failed To BUILD! Please check the build logs for details.'
});
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

steps: list items are not indented under steps. With the current indentation, the - name: ... entries become siblings of steps and the workflow YAML will not parse. Indent step items under steps: (e.g., steps: then - name:).

Suggested change
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
- name: Download Go modules
run: go mod download
- name: Build
run: go build -o main .
- name: Comment on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'REQUEST_CHANGES',
body: 'Failed To BUILD! Please check the build logs for details.'
});
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
- name: Download Go modules
run: go mod download
- name: Build
run: go build -o main .
- name: Comment on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'REQUEST_CHANGES',
body: 'Failed To BUILD! Please check the build logs for details.'
});

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +37
- name: Comment on failure
if: failure()
uses: actions/github-script@v7
with:
script: |
await github.rest.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
event: 'REQUEST_CHANGES',
body: 'Failed To BUILD! Please check the build logs for details.'
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

The actions/github-script step calls pulls.createReview, which requires pull-requests: write permission. This workflow doesn't set explicit permissions, so the step may fail (especially on orgs that default GITHUB_TOKEN to read-only / on fork PRs). Consider adding permissions: pull-requests: write (and gating fork PRs if needed) so the failure comment is reliable.

Copilot uses AI. Check for mistakes.
- name: Deploy container locally
run: |
IMAGE=${{ secrets.DOCKER_HUB_USERNAME }}/control_deploy:latest
IMAGE=${{ secrets.DOCKER_HUB_USERNAME }}/control_dev:latest
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

IMAGE is set to .../control_dev:latest, but this workflow currently builds/tags .../control_deploy:latest earlier in the job. As written, docker run $IMAGE will either fail (image not found) or pull a different image than the one just built. Align the image name/tag between the build step and the deploy step.

Suggested change
IMAGE=${{ secrets.DOCKER_HUB_USERNAME }}/control_dev:latest
IMAGE=${{ secrets.DOCKER_HUB_USERNAME }}/control_deploy:latest

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +31
docker run -d --name CONTROL_DEPLOY -p 8083:8081 --restart=always \
--add-host host.docker.internal:host-gateway \
-e CORES="${{ secrets.CORES }}" \
-e DB_USER="${{ secrets.DB_USER }}" \
-e DB_PASSWORD="${{ secrets.DB_PASSWORD }}" \
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

The docker run command uses \\ at end-of-line for continuation inside the bash script. In bash, \\ escapes the second backslash and does not escape the newline, so the command will break into multiple commands. Use a single trailing \ for line continuation (or remove continuations and keep it on one line).

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,38 @@
name: PR Build Verification
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

The PR title/description don't describe the intent or expected behavior of these workflow changes (they still contain the template placeholders). Please update the PR description to explain what the new PR build check is for and why the deploy workflow’s container settings (ports/env vars/image name) changed.

Copilot uses AI. Check for mistakes.
@ukleon123 ukleon123 closed this Apr 6, 2026
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.

5 participants