Conversation
WalkthroughGitHub Actions 워크플로우 파일 두 곳에서 배포 스크립트 실행 시 하드코딩된 사용자 디렉터리 경로( Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant GCE Instance
GitHub Actions->>GCE Instance: gcloud auth activate-service-account (동적 경로 사용)
GitHub Actions->>GCE Instance: docker login
GitHub Actions->>GCE Instance: docker pull
GitHub Actions->>GCE Instance: chmod +x deploy.sh (동적 경로 사용)
GitHub Actions->>GCE Instance: USERNAME 환경 변수 설정
GitHub Actions->>GCE Instance: ./deploy.sh 실행 (동적 경로 사용)
GitHub Actions->>GCE Instance: docker image prune
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Test Results1 tests 1 ✅ 0s ⏱️ Results for commit 5bca61f. |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
.github/workflows/server_cd_develop.yml (1)
114-114: 디테일: 불필요한 공백 제거 권장
YAMLLint에서 감지된 트레일링 스페이스(줄 끝 공백)가 발생하고 있습니다. 해당 빈 줄의 후행 공백을 제거해 주세요.Also applies to: 117-117, 119-119
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 114-114: trailing spaces
(trailing-spaces)
.github/workflows/server_cd_release.yml (2)
113-113: 디테일: 불필요한 공백 제거 권장
YAMLLint에서 감지된 트레일링 스페이스(줄 끝 공백)가 발생하고 있습니다. 해당 빈 줄의 후행 공백을 제거해 주세요.Also applies to: 116-116, 118-118
🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 113-113: trailing spaces
(trailing-spaces)
1-126: 중복 워크플로우 요소 리팩터 제안
두 워크플로우에서 거의 동일한 배포 단계가 반복되고 있습니다. 재사용 가능한 composite workflow나 reusable job으로 추출하여 DRY 원칙에 맞게 관리하면 유지보수 비용을 줄일 수 있습니다.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 93-93: trailing spaces
(trailing-spaces)
[error] 113-113: trailing spaces
(trailing-spaces)
[error] 116-116: trailing spaces
(trailing-spaces)
[error] 118-118: trailing spaces
(trailing-spaces)
[error] 123-123: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/server_cd_develop.yml(2 hunks).github/workflows/server_cd_release.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/server_cd_release.yml
[error] 113-113: trailing spaces
(trailing-spaces)
[error] 116-116: trailing spaces
(trailing-spaces)
[error] 118-118: trailing spaces
(trailing-spaces)
.github/workflows/server_cd_develop.yml
[error] 114-114: trailing spaces
(trailing-spaces)
[error] 117-117: trailing spaces
(trailing-spaces)
[error] 119-119: trailing spaces
(trailing-spaces)
🔇 Additional comments (7)
.github/workflows/server_cd_develop.yml (4)
8-9: 동적 브랜치 트리거 적용 확인
’fix/#346-fix_cicd’ 브랜치를 단일 인용부호로 감싸서#문자가 그대로 인식되도록 처리했습니다. 의도한 대로 해당 브랜치에서 워크플로우가 실행되는지 확인하세요.
113-113: 서비스 계정 키 경로 동적 변수화 완료
하드코딩된/home/g11_27_proro/…경로를${{ secrets.GCE_INSTANCE_USER }}로 대체해 유연성을 확보했습니다.
120-120: 환경 변수USERNAME설정 추가
Docker Compose 파일에서 사용할USERNAME환경 변수를 SSH 내부 스크립트에 주입했습니다.
122-123: 배포 스크립트 실행 권한 부여 및 호출
sudo chmod +x와sudo -E옵션을 통해 환경 변수를 유지하며deploy.sh를 실행하도록 개선했습니다..github/workflows/server_cd_release.yml (3)
113-113: 서비스 계정 키 경로 동적 변수화 완료
하드코딩된/home/g11_27_proro/…경로를${{ secrets.GCE_INSTANCE_USER }}로 대체해 유연성을 확보했습니다.🧰 Tools
🪛 YAMLlint (1.35.1)
[error] 113-113: trailing spaces
(trailing-spaces)
119-119: 환경 변수USERNAME설정 추가
Docker Compose 파일에서 사용할USERNAME환경 변수를 SSH 내부 스크립트에 주입했습니다.
121-122: 배포 스크립트 실행 권한 부여 및 호출
sudo chmod +x와sudo -E옵션을 통해 환경 변수를 유지하며deploy.sh를 실행하도록 개선했습니다.
#️⃣연관된 이슈
📝작업 내용
중점적으로 리뷰받고 싶은 부분(선택)
논의하고 싶은 부분(선택)
🫡 참고사항
Summary by CodeRabbit