Skip to content

#49 chore: Github Actions CI/CD 파이프라인 구축#50

Merged
JiiminHa merged 10 commits intodevelopfrom
chore/49-setup-cicd
Feb 20, 2026
Merged

#49 chore: Github Actions CI/CD 파이프라인 구축#50
JiiminHa merged 10 commits intodevelopfrom
chore/49-setup-cicd

Conversation

@JiiminHa
Copy link
Contributor

@JiiminHa JiiminHa commented Feb 19, 2026

⚙️ Related ISSUE Number

close #49



📄 Work Description

CI/CD 및 릴리스 자동화

  • 새로운 CI/CD 워크플로우 도입: .github/workflows/ci-cd.yml 파일을 추가하여 developmain 브랜치에 대한 린트(Lint), 빌드, 의존성 캐싱을 자동화했습니다. 빌드 시 필요한 환경 변수 관리 기능도 포함되었습니다.
  • Release Drafter 자동화: .github/workflows/release-drafter.yml을 통해 릴리스 브랜치나 main 브랜치로의 푸시 및 PR을 기반으로 릴리스 초안을 자동으로 작성하고 발행하도록 설정했습니다.
  • 릴리스 구성 최적화: .github/template/release-drafter.yml 파일을 추가하여 변경 사항의 카테고리 분류, 버전 계산 규칙, 릴리스 노트 포맷을 정의했습니다.

코드베이스 일관성 및 리팩토링

  • 공통 타입 임포트 경로 정리: 여러 파일(CourseHero, AssignmentList 등)에서 사용되던 SemesterCode와 같은 공통 타입의 경로를 @/entities/course/model/types에서 @/shared/model/common으로 일관되게 변경하여 유지보수성을 높였습니다.
  • UI 컴포넌트 코드 스타일 개선: Badge, SelectableItem 등 UI 컴포넌트 내에서 임포트 형식을 정리하고, switch-case 문의 스코프를 최적화하여 가독성을 개선했습니다.

제안

이 PR이 머지된 후에는 Release Drafter가 정상적으로 작동하도록 각 PR에 **라벨(feat, fix, refactor 등)**을 꼭 달아야 합니다. 물론 저만 잘하면 될 것 같아요...



📷 Screenshot

해당 없음



💬 To Reviewers



🔗 Reference

@JiiminHa JiiminHa requested a review from suminb99 February 19, 2026 09:40
@JiiminHa JiiminHa self-assigned this Feb 19, 2026
@JiiminHa JiiminHa added 🧹 chore 프로젝트 설정 / 빌드 / 패키지 관리 ⚙️ setting 개발 환경 세팅 labels Feb 19, 2026
@vercel
Copy link

vercel bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
snow-code-client Ready Ready Preview, Comment Feb 19, 2026 2:27pm

@JiiminHa JiiminHa force-pushed the chore/49-setup-cicd branch from 3f70593 to ba049f8 Compare February 19, 2026 12:45
@coderabbitai
Copy link

coderabbitai bot commented Feb 19, 2026

📝 Walkthrough

Summary by CodeRabbit

릴리스 노트

  • Chores

    • CI/CD 파이프라인 자동화 설정 추가
    • 릴리스 노트 자동 생성 시스템 구성
  • Refactor

    • 코드 구조 및 타입 정의 최적화
    • 내부 모듈 간 의존성 정리

Walkthrough

GitHub Actions 기반 CI/CD 및 Release Drafter 워크플로우 추가, UI 컴포넌트의 export 정리, 타입 재내보내기 제거 및 일부 import 경로/포맷 정리. 주로 구성·리팩토링 변경입니다. (50단어 이내)

Changes

Cohort / File(s) Summary
GitHub Actions 자동화
\.github/workflows/ci-cd.yml, \.github/workflows/release-drafter.yml, \.github/template/release-drafter.yml
CI/CD 워크플로우(노드 설정, pnpm 캐시, lint, build) 추가 및 Release Drafter 구성/워크플로우 추가. 비밀변수 사용 및 조건부 퍼블리시 단계 포함.
UI 컴포넌트 변경
src/shared/ui/SelectableItem.tsx, src/shared/ui/Badge.tsx
selectableItemStyles의 export 제거(이제 내부 상수), Badge의 switch case에 블록 스코프 추가 — 기능 변경 없음.
타입 재내보내기 정리
src/entities/course/model/types.ts
AssignmentSemesterCode, SubmissionStatus에 대한 재내보내기 제거 — 다른 모듈의 import 경로/해결에 영향 가능.
Import/포맷 수정
src/pages/select-assignment/AssignmentSelectPage.tsx, src/pages/course-overview/ui/AssignmentList.tsx, src/pages/course-overview/ui/CourseHero.tsx, src/shared/lib/course.ts
타입/심볼의 import 경로 조정(예: Assignment@/entities/assignment/model/types, SemesterCode 이동) 및 import 구문 포맷 정리. 런타임 로직 변경 없음.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • suminb99

📝 추가 검토 권장사항

  • 타입 재내보내기 영향 검증: Assignment, SemesterCode, SubmissionStatus 제거로 인한 정적 타입 에러나 잘못된 import 경로가 있는지 프로젝트 전체에서 검색하여 교체 여부를 확인하세요. (참고: TypeScript 모듈 해석 문서 — https://www.typescriptlang.org/docs/handbook/module-resolution.html)
  • CI/Secrets 확인: .github/workflows/ci-cd.yml이 참조하는 VITE_* 시크릿이 GitHub 리포지토리 Settings > Secrets에 설정되어 있는지 확인하세요. (참고: https://docs.github.com/actions/security-guides/encrypted-secrets)
  • Release Drafter 구성 검토: template/release-drafter.yml의 카테고리/레이블 매핑이 팀의 커밋 전략(레이블 사용)과 일치하는지 확인하세요. (참고: https://github.com/release-drafter/release-drafter)
  • Switch 스코프 변경 점검: Badge 컴포넌트의 case 블록 스코프 추가는 변수 선언 충돌 방지 관점에서 권장됩니다. 다른 switch 문에도 동일 패턴 적용을 고려하세요.

짧고 깔끔한 변화네요 — 좋은 자동화 추가입니다.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive Badge.tsx, SelectableItem.tsx의 마이너 포매팅 변경과 타입 임포트 경로 정리가 CI/CD 목표와의 직접적 관련성이 불명확합니다. 마이너 UI 컴포넌트 변경사항(Badge, SelectableItem)과 타입 임포트 리팩토링이 CI/CD 파이프라인 구축과 어떤 연관이 있는지 명확히 하거나, 별도 PR로 분리하는 것을 고려하세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목은 PR의 주요 변경사항인 CI/CD 파이프라인 구축을 명확하고 간결하게 요약하고 있습니다.
Description check ✅ Passed 설명은 CI/CD 자동화, 릴리스 드래프터 설정, 코드베이스 리팩토링 등 실제 변경사항을 구체적으로 설명하고 있습니다.
Linked Issues check ✅ Passed PR은 #49 이슈의 목적인 Github Actions CI/CD 파이프라인 구축을 완료했으며, 워크플로우 파일 추가와 코드베이스 정리를 모두 구현했습니다.
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 docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/49-setup-cicd

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

@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: 4

🧹 Nitpick comments (3)
.github/workflows/ci-cd.yml (3)

48-48: pnpm install--frozen-lockfile 명시를 고려해 보세요.

pnpm의 --frozen-lockfile 옵션은 CI 환경에서 기본적으로 true로 설정됩니다. GitHub Actions는 CI=true 환경 변수를 자동으로 제공하므로, 현재 설정으로도 동일하게 동작합니다. 다만, 의도를 명확히 표현하고 이후 실수 방지를 위해 명시적으로 플래그를 추가하는 것을 권장합니다.

🛠️ 수정 제안
-        run: pnpm install
+        run: pnpm install --frozen-lockfile
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci-cd.yml at line 48, The CI step currently runs "pnpm
install" without explicit lockfile enforcement; update the workflow step (the
run command that contains pnpm install) to include the --frozen-lockfile flag so
the job fails if package-lock changes (e.g., replace "pnpm install" with "pnpm
install --frozen-lockfile") to make the intent explicit and prevent accidental
lockfile drift in CI.

50-58: TypeScript 타입 체크 step 추가를 고려해 보세요.

Vite의 pnpm build는 TypeScript를 트랜스파일만 수행하고 타입 오류를 검증하지 않습니다. CI에서 타입 오류를 잡으려면 별도 tsc --noEmit step이 필요합니다.

🛠️ 수정 제안
       - name: Lint
         run: pnpm lint

+      - name: Type check
+        run: pnpm tsc --noEmit

       - name: Build
         run: pnpm build
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci-cd.yml around lines 50 - 58, Add a dedicated TypeScript
type-check step to the CI workflow because "pnpm build" only transpiles; insert
a new job step (e.g., name: Type Check) after the Lint step (or before Build)
that runs the TypeScript compiler with no emit (pnpm exec tsc --noEmit or npm
run tsc --noEmit) to fail the job on type errors; reference the existing step
names "Lint" and "Build" and the command "pnpm build" when locating where to add
the new step.

15-15: Job 이름 build-and-deploy에 배포(deploy) 단계가 없습니다.

워크플로의 실제 동작(lint + build)과 이름이 불일치합니다. 배포 로직이 아직 구현되지 않았다면 build 또는 ci로 이름을 변경하는 편이 더 명확합니다.

🛠️ 수정 제안
-  build-and-deploy:
+  build:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci-cd.yml at line 15, Job 이름 'build-and-deploy'가 실제로는 배포
단계가 없어 혼동을 일으키므로, 워크플로의 동작과 이름을 일치시키도록 수정하세요: (1) 간단한 해결책으로 워크플로 내 job key
'build-and-deploy'를 'build' 또는 'ci'로 이름 변경하여 의미를 맞추거나, (2) 배포가 의도된 경우 현재
'build-and-deploy' job에 배포 단계를 추가(예: 배포용 action/step)하여 이름과 동작을 일치시키세요; 변경 대상
식별자: job 이름 'build-and-deploy' 및 관련 steps 블록.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/models/assignment.ts`:
- Line 1: Update the import in src/models/assignment.ts to use the project's
absolute alias instead of a relative path: replace the relative import of
SubmissionStatus with an absolute import using "@/shared/model/common" so the
file imports SubmissionStatus from the absolute path; ensure you update the
import statement that references SubmissionStatus accordingly and keep the
type-only import style (import type { SubmissionStatus } ...).
- Around line 6-10: Remove the duplicate Assignment interface from
src/models/assignment.ts and switch all imports to the single source in
src/entities/assignment/model/types.ts; specifically, delete the Assignment
definition in the models layer, ensure src/entities/assignment/model/types.ts
exports the Assignment and SubmissionStatus types, then update any files that
currently import Assignment from src/models/assignment.ts (e.g.,
src/models/course.ts and any other usages) to import from
src/entities/assignment/model/types.ts so all layers use the same type
definition.

In `@src/models/course.ts`:
- Around line 1-3: Change the three relative import statements to use absolute
path imports (starting with '@/') so they follow the project guideline: replace
the import for Assignment (currently from './assignment') and the imports for
ApiResponse and SemesterCode (currently from '../shared/model/common') and the
export of SubmissionStatus to use '@/models/assignment' or the appropriate
'@/shared/model/common' absolute module paths respectively; update the
import/export module specifiers while keeping the symbol names (Assignment,
ApiResponse, SemesterCode, SubmissionStatus) unchanged.
- Around line 23-69: The file contains unused type/interface definitions (Unit,
BaseCourse, CourseOverview, DashboardCourse, AssignmentSelectCourse and related
response types) which are duplicated in the canonical definitions under the
project; remove this file entirely to avoid confusion and rely on the single
source of truth (the existing types in the entities/course model), ensuring no
imports reference these interfaces before deletion and updating any accidental
imports to use the canonical types.

---

Nitpick comments:
In @.github/workflows/ci-cd.yml:
- Line 48: The CI step currently runs "pnpm install" without explicit lockfile
enforcement; update the workflow step (the run command that contains pnpm
install) to include the --frozen-lockfile flag so the job fails if package-lock
changes (e.g., replace "pnpm install" with "pnpm install --frozen-lockfile") to
make the intent explicit and prevent accidental lockfile drift in CI.
- Around line 50-58: Add a dedicated TypeScript type-check step to the CI
workflow because "pnpm build" only transpiles; insert a new job step (e.g.,
name: Type Check) after the Lint step (or before Build) that runs the TypeScript
compiler with no emit (pnpm exec tsc --noEmit or npm run tsc --noEmit) to fail
the job on type errors; reference the existing step names "Lint" and "Build" and
the command "pnpm build" when locating where to add the new step.
- Line 15: Job 이름 'build-and-deploy'가 실제로는 배포 단계가 없어 혼동을 일으키므로, 워크플로의 동작과 이름을
일치시키도록 수정하세요: (1) 간단한 해결책으로 워크플로 내 job key 'build-and-deploy'를 'build' 또는 'ci'로
이름 변경하여 의미를 맞추거나, (2) 배포가 의도된 경우 현재 'build-and-deploy' job에 배포 단계를 추가(예: 배포용
action/step)하여 이름과 동작을 일치시키세요; 변경 대상 식별자: job 이름 'build-and-deploy' 및 관련 steps
블록.

@vercel vercel bot temporarily deployed to Preview – snow-code-client-qwhr February 19, 2026 12:54 Inactive
Copy link

@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.

🧹 Nitpick comments (5)
.github/workflows/release-drafter.yml (4)

3-7: 향후 autolabeler 활용을 위한 pull_request 트리거 추가 고려

pull_request 이벤트는 autolabeler 기능을 사용할 때 필요하며, types: [opened, reopened, synchronize]와 함께 설정합니다. 현재 autolabeler를 사용하지 않으므로 필수는 아니지만, 나중에 PR 자동 레이블링을 추가할 경우 트리거도 함께 추가해야 합니다. 미리 구조를 갖춰두면 확장이 용이합니다.

➕ 제안 수정 (선택 사항)
 on:
   push:
     branches:
       - release/*
       - main
+  pull_request:
+    types: [opened, reopened, synchronize]
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-drafter.yml around lines 3 - 7, Add a pull_request
trigger to the workflow by updating the top-level on: block to include
pull_request with types: [opened, reopened, synchronize]; specifically add a new
key 'pull_request' alongside 'push' so the workflow reacts to PR events (use the
exact symbol names pull_request and types: [opened, reopened, synchronize]) to
enable future autolabeler usage and PR-based release-drafter runs.

17-18: Checkout 단계는 release-drafter에 불필요합니다 🗑️

release-drafter는 설정 파일을 포함한 모든 데이터를 GitHub API를 통해 읽으며, 로컬 파일시스템에 직접 접근하지 않습니다. 공식 release-drafter 예제 워크플로우에서도 checkout 단계 없이 바로 release-drafter 액션을 실행합니다. 불필요한 단계를 제거하면 워크플로우 실행 시간을 단축할 수 있습니다.

✂️ 제안 수정
     steps:
-      - name: Checkout
-        uses: actions/checkout@v4
-
       - name: Update Draft Release
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-drafter.yml around lines 17 - 18, Remove the
unnecessary "Checkout" step (the step with name: Checkout and uses:
actions/checkout@v4) from the workflow since release-drafter reads repo data via
the GitHub API and does not need a local checkout; delete that step block and
leave the release-drafter action intact so the job runs without the checkout
step.

28-36: id: drafter가 사용되지 않음 (dead config)

release-drafter는 id, html_url, upload_url 등의 출력값을 제공하며, 이를 이후 단계의 입력으로 활용할 수 있습니다. 그러나 현재 워크플로우에는 steps.drafter.outputs.*를 참조하는 후속 단계가 없으므로 id: drafter는 불필요합니다. 향후 출력값 활용 계획이 없다면 제거하는 것이 깔끔합니다.

✂️ 제안 수정
       - name: Publish Release
         if: github.ref == 'refs/heads/main'
-        id: drafter
         uses: release-drafter/release-drafter@v6
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-drafter.yml around lines 28 - 36, 현재 "Publish
Release" workflow step에 선언된 id: drafter가 후속 단계에서 사용되지 않으므로 불필요합니다; 수정 방법은 간단히 해당
step의 id: drafter 라인만 제거하거나, 만약 release-drafter의 출력값(html_url, upload_url 등)을 쓸
계획이면 후속 step에서 steps.drafter.outputs.*를 참조하도록 추가로 구현하는 것입니다 — 변경 대상 식별자:
"Publish Release" step, id: drafter, uses: release-drafter/release-drafter@v6,
outputs 참조용 steps.drafter.outputs.*.

22-26: GitHub Actions는 커밋 SHA로 고정하기

release-drafter/release-drafter@v6는 가변(mutable) 태그입니다. 업스트림에서 동일 태그를 다른 커밋으로 옮기거나 악성 코드를 push할 수 있으므로, 공급망 공격(supply chain attack)으로부터 보호하기 위해 GitHub는 서드파티 액션을 전체 커밋 SHA(40자)로 고정할 것을 권장합니다.

권장 방식: 전체 SHA + 버전 태그를 주석으로 기록하면 가독성이 좋고 나중에 업그레이드할 때도 용이합니다.

🔒 제안 수정
         - name: Update Draft Release
           if: startsWith(github.ref, 'refs/heads/release/')
-          uses: release-drafter/release-drafter@v6
+          uses: release-drafter/release-drafter@6db134d15f3909ccc9eefd369f02bd1e9cffdf97 # v6.2.0
           with:
             config-name: template/release-drafter.yml
           env:
             GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

         - name: Publish Release
           if: github.ref == 'refs/heads/main'
           id: drafter
-          uses: release-drafter/release-drafter@v6
+          uses: release-drafter/release-drafter@6db134d15f3909ccc9eefd369f02bd1e9cffdf97 # v6.2.0
           with:
             config-name: template/release-drafter.yml
             publish: true
           env:
             GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

참고: GitHub 보안 강화 가이드 - Actions 보호에서 더 자세한 내용과 자동화 방법을 확인하실 수 있습니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-drafter.yml around lines 22 - 26, 현재 사용 중인
release-drafter/release-drafter@v6 같은 가변 태그를 전체 커밋 SHA(40자)로 고정해야 합니다; 변경 대상은
리포지토에서 사용 중인 액션 식별자 release-drafter/release-drafter@v6를 찾아서 이를 upstream 릴리스의 전체
커밋 SHA로 교체하고(예: release-drafter/release-drafter@<40-char-sha>) 기존 버전 태그(v6)는
주석으로 남겨 가독성을 유지하도록 합니다.
.github/template/release-drafter.yml (1)

9-11: 카테고리 제목 '⚙️ 기능 개선'과 라벨 'Refactor' 사이의 의미 불일치 💡

Refactor는 기능 추가나 개선이 아닌 코드 구조 변경을 의미합니다. '⚙️ 기능 개선'으로 명명하면 릴리스 노트 독자에게 혼란을 줄 수 있습니다. '♻️ 리팩토링'처럼 실제 의미를 반영하는 제목을 사용하는 것이 더 명확합니다.

✏️ 제안 수정
-  - title: '⚙️ 기능 개선'
+  - title: '♻️ 리팩토링'
     labels:
       - 'Refactor'
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/template/release-drafter.yml around lines 9 - 11, The
release-drafter category title "⚙️ 기능 개선" conflicts with the label "Refactor";
update the category title to match the intent of the Refactor label (e.g.,
change "⚙️ 기능 개선" to "♻️ 리팩토링" or similar) so the title accurately reflects
code-structure changes, keeping the existing labels section (label: 'Refactor')
and only modifying the title string.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/template/release-drafter.yml:
- Around line 9-11: The release-drafter category title "⚙️ 기능 개선" conflicts with
the label "Refactor"; update the category title to match the intent of the
Refactor label (e.g., change "⚙️ 기능 개선" to "♻️ 리팩토링" or similar) so the title
accurately reflects code-structure changes, keeping the existing labels section
(label: 'Refactor') and only modifying the title string.

In @.github/workflows/release-drafter.yml:
- Around line 3-7: Add a pull_request trigger to the workflow by updating the
top-level on: block to include pull_request with types: [opened, reopened,
synchronize]; specifically add a new key 'pull_request' alongside 'push' so the
workflow reacts to PR events (use the exact symbol names pull_request and types:
[opened, reopened, synchronize]) to enable future autolabeler usage and PR-based
release-drafter runs.
- Around line 17-18: Remove the unnecessary "Checkout" step (the step with name:
Checkout and uses: actions/checkout@v4) from the workflow since release-drafter
reads repo data via the GitHub API and does not need a local checkout; delete
that step block and leave the release-drafter action intact so the job runs
without the checkout step.
- Around line 28-36: 현재 "Publish Release" workflow step에 선언된 id: drafter가 후속
단계에서 사용되지 않으므로 불필요합니다; 수정 방법은 간단히 해당 step의 id: drafter 라인만 제거하거나, 만약
release-drafter의 출력값(html_url, upload_url 등)을 쓸 계획이면 후속 step에서
steps.drafter.outputs.*를 참조하도록 추가로 구현하는 것입니다 — 변경 대상 식별자: "Publish Release"
step, id: drafter, uses: release-drafter/release-drafter@v6, outputs 참조용
steps.drafter.outputs.*.
- Around line 22-26: 현재 사용 중인 release-drafter/release-drafter@v6 같은 가변 태그를 전체 커밋
SHA(40자)로 고정해야 합니다; 변경 대상은 리포지토에서 사용 중인 액션 식별자
release-drafter/release-drafter@v6를 찾아서 이를 upstream 릴리스의 전체 커밋 SHA로 교체하고(예:
release-drafter/release-drafter@<40-char-sha>) 기존 버전 태그(v6)는 주석으로 남겨 가독성을 유지하도록
합니다.

Copy link

@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: 2

🧹 Nitpick comments (1)
.github/workflows/release-drafter.yml (1)

29-36: main 푸시 시 드래프트 검토 없이 즉시 릴리스 발행됨

publish: true 설정으로 인해 main에 코드가 푸시되는 순간 릴리스가 자동으로 공개됩니다. 릴리스 노트를 팀에서 검토하거나 수정할 기회가 없습니다.

팀의 릴리스 프로세스에 따라 두 가지 방향을 고려해보세요:

  • 현재 방식 유지 (완전 자동화): 모든 PR 라벨이 정확히 관리되어야 하며, 릴리스 노트 오류 시 수동 수정이 필요합니다.
  • 반자동화 권장: main 푸시 시에도 드래프트만 업데이트하고, 팀이 직접 GitHub Releases에서 검토 후 발행하는 방식.
💡 반자동화 방식으로 변경 시
       - name: Publish Release
         if: github.ref == 'refs/heads/main' && github.event_name == 'push'
         uses: release-drafter/release-drafter@v6
         with:
           config-name: template/release-drafter.yml
-          publish: true
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-drafter.yml around lines 29 - 36, The workflow
currently auto-publishes releases because the "Publish Release" job sets the
release-drafter input publish: true; change this to publish: false (or remove
the publish input) in the Publish Release step so main pushes only update the
draft, and optionally implement a separate manual or protected "Publish Release"
workflow/job that calls release-drafter with publish: true when the team
approves; look for the step named "Publish Release" and the inputs config-name
and publish to make this change.
🤖 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/release-drafter.yml:
- Around line 3-10: Replace the current pull_request trigger with
pull_request_target and add a branches filter to it (e.g., branches: [release/*,
main]) so the workflow only runs for PRs targeting those base branches and
executes with write permissions; update the workflow permissions to grant
contents: write for the job that performs "Update Draft Release" and confirm no
step checks out or runs untrusted PR code (the safety note references the
absence of a checkout), keeping the triggers: on.pull_request_target and the
branches filter in sync.
- Line 23: The workflow references the third-party action
release-drafter/release-drafter@v6; replace this mutable tag with a specific
commit SHA to pin the action and prevent unexpected updates. Locate every
occurrence of the string "release-drafter/release-drafter@v6" (there are two
occurrences) and change each to "release-drafter/release-drafter@<commit-sha>"
using the exact commit SHA from the v6 release you trust, making sure both
occurrences use the same SHA.

---

Nitpick comments:
In @.github/workflows/release-drafter.yml:
- Around line 29-36: The workflow currently auto-publishes releases because the
"Publish Release" job sets the release-drafter input publish: true; change this
to publish: false (or remove the publish input) in the Publish Release step so
main pushes only update the draft, and optionally implement a separate manual or
protected "Publish Release" workflow/job that calls release-drafter with
publish: true when the team approves; look for the step named "Publish Release"
and the inputs config-name and publish to make this change.

Comment on lines +3 to +10
on:
push:
branches:
- release/*
- main
# PR 이벤트 추가로 자동화 범위 확대
pull_request:
types: [opened, reopened, synchronize]
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

pull_request 트리거에 브랜치 필터 없음 + 포크 PR 권한 문제

두 가지 연관된 문제가 있습니다:

  1. 브랜치 필터 미지정: pull_request 이벤트에 branches 필터가 없어, 기능 브랜치(예: feature/* → feature/*) 대상 PR 포함 모든 PR에서 워크플로우가 실행됩니다. 불필요한 실행을 줄이려면 대상 브랜치를 명시하는 것이 좋습니다.

  2. 포크 PR 권한 부족: pull_request 이벤트는 포크에서 생성된 PR에 대해 GITHUB_TOKEN이 읽기 전용으로 제한됩니다. "Update Draft Release" 스텝은 contents: write 권한이 필요하므로, 외부 기여자의 포크 PR에서 실패할 수 있습니다. pull_request_target 이벤트를 사용하면 포크 PR에서도 쓰기 권한이 유지됩니다. 단, 이 이벤트는 PR 브랜치가 아닌 베이스 브랜치에서 실행됩니다.

✨ 개선 제안
 on:
   push:
     branches:
       - release/*
       - main
-  # PR 이벤트 추가로 자동화 범위 확대
-  pull_request:
-    types: [opened, reopened, synchronize]
+  # pull_request_target: 포크 PR에서도 write 권한 유지
+  pull_request_target:
+    types: [opened, reopened, synchronize]
+    branches:
+      - develop
+      - main
+      - release/*

⚠️ pull_request_target 사용 시, 신뢰할 수 없는 코드를 checkout 후 빌드하는 스텝이 없어야 합니다. 현재 워크플로우는 checkout 단계가 없으므로 안전합니다.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-drafter.yml around lines 3 - 10, Replace the
current pull_request trigger with pull_request_target and add a branches filter
to it (e.g., branches: [release/*, main]) so the workflow only runs for PRs
targeting those base branches and executes with write permissions; update the
workflow permissions to grant contents: write for the job that performs "Update
Draft Release" and confirm no step checks out or runs untrusted PR code (the
safety note references the absence of a checkout), keeping the triggers:
on.pull_request_target and the branches filter in sync.

# Checkout 단계 제거 (불필요한 작업 생략)
- name: Update Draft Release
if: startsWith(github.ref, 'refs/heads/release/') || github.event_name == 'pull_request'
uses: release-drafter/release-drafter@v6
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# Check if the workflow file exists and verify lines 23 and 31
fd -g "release-drafter.yml" -x cat -n {} | head -40

Repository: 2025-snowCode/snowCode-Client

Length of output: 55


🌐 Web query:

release-drafter v6 latest commit SHA github

💡 Result:

The release-drafter/release-drafter@v6 tag currently points to the same commit as the latest v6.x release (v6.2.0): 6db134d15f3909ccc9eefd369f02bd1e9cffdf97. [1][2]


🏁 Script executed:

# Find the workflow file
fd -name "release-drafter.yml" -type f

Repository: 2025-snowCode/snowCode-Client

Length of output: 303


🏁 Script executed:

# Also check the workflow directory structure
find . -path "./.git" -prune -o -type f -name "*.yml" -print | grep -i workflow | head -20

Repository: 2025-snowCode/snowCode-Client

Length of output: 301


🏁 Script executed:

# Read the workflow file to check lines 23 and 31
cat -n ./.github/workflows/release-drafter.yml | sed -n '20,35p'

Repository: 2025-snowCode/snowCode-Client

Length of output: 790


써드파티 액션을 가변 태그 @v6로 참조 중 — 커밋 SHA로 고정 필요

release-drafter/release-drafter@v6는 가변 태그로, 태그가 악의적인 커밋으로 이동될 경우 워크플로우가 의도하지 않은 코드를 실행할 수 있습니다. GitHub의 보안 강화 가이드에 따라 특정 커밋 SHA로 고정하세요.

🔒 개선 방법 (현재 v6 커밋 SHA로 고정)
-        uses: release-drafter/release-drafter@v6
+        uses: release-drafter/release-drafter@6db134d15f3909ccc9eefd369f02bd1e9cffdf97 # v6.2.0

23번 줄과 31번 줄 모두 동일하게 수정해주세요.

📝 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.

Suggested change
uses: release-drafter/release-drafter@v6
uses: release-drafter/release-drafter@6db134d15f3909ccc9eefd369f02bd1e9cffdf97 # v6.2.0
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/release-drafter.yml at line 23, The workflow references
the third-party action release-drafter/release-drafter@v6; replace this mutable
tag with a specific commit SHA to pin the action and prevent unexpected updates.
Locate every occurrence of the string "release-drafter/release-drafter@v6"
(there are two occurrences) and change each to
"release-drafter/release-drafter@<commit-sha>" using the exact commit SHA from
the v6 release you trust, making sure both occurrences use the same SHA.

Copy link
Contributor

@suminb99 suminb99 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!! 👍

@JiiminHa JiiminHa merged commit 8b2bc9b into develop Feb 20, 2026
3 checks passed
@JiiminHa JiiminHa deleted the chore/49-setup-cicd branch February 20, 2026 01:27
This was referenced Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧹 chore 프로젝트 설정 / 빌드 / 패키지 관리 ⚙️ setting 개발 환경 세팅

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Github Actions CI/CD 파이프라인 구축

2 participants