Skip to content

Conversation

@move-hoon
Copy link
Member

Related issue 🛠

Work Description ✏️

  • GitHub Actions 워크플로우의 환경변수 관리 방식을 개선했습니다.
  • 기존에 4개로 분리되어 있던 Slack Webhook Secret(SLACK_WEBHOOK_CREW_DEV_BE, SLACK_WEBHOOK_CREW_DEV_FE, SLACK_WEBHOOK_CREW_PROD_BE, SLACK_WEBHOOK_CREW_PROD_FE)을 하나의 DOTENV_FILE Secret으로 통합하여 워크플로우 코드를 간소화했습니다.

주요 변경사항

  • .env 파일 생성 로직을 10줄에서 3줄로 단축
  • Secret 관리 포인트를 4개에서 1개로 축소
  • 환경변수 추가/수정 시 워크플로우 파일 수정 불필요

Trouble Shooting ⚽️

  • None

@move-hoon move-hoon self-assigned this Oct 7, 2025
@move-hoon move-hoon linked an issue Oct 7, 2025 that may be closed by this pull request
4 tasks
@height
Copy link

height bot commented Oct 7, 2025

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

💡Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.

@coderabbitai
Copy link

coderabbitai bot commented Oct 7, 2025

Summary by CodeRabbit

  • Chores
    • CI/CD에서 환경 변수 파일 생성 방식을 단일 비밀 값 기반으로 통합했습니다.
    • 개별 비밀 키 조합 없이 한 번에 .env 내용을 주입하도록 간소화했습니다.
    • 워크플로 단계 일관성과 유지보수성을 개선하고 설정 오류 가능성을 낮췄습니다.

Walkthrough

GitHub Actions 워크플로우(.github/workflows/cd.yml 및 .github/workflows/ci.yml)에서 .env 생성 로직을 변경했습니다. 기존에 개별 Slack webhook 시크릿을 heredoc으로 직접 쓰던 부분을 제거하고, secrets.DOTENV_FILE의 내용을 src/main/resources/.env에 단일 명령으로 출력하도록 통합했습니다. 다른 단계 변경 없음.

Changes

Cohort / File(s) Summary
CD Workflow
.github/workflows/cd.yml
.env 생성 단계: 개별 SLACK_WEBHOOK_* heredoc 작성 제거 → env: DOTENV_FILE: ${{ secrets.DOTENV_FILE }} 추가 후 printf "%s" "$DOTENV_FILE" > src/main/resources/.env로 대체.
CI Workflow
.github/workflows/ci.yml
동일 변경: 네 개의 개별 Slack webhook 시크릿 쓰기 제거 → secrets.DOTENV_FILEprintfsrc/main/resources/.env에 출력하도록 통합.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    actor Dev as 개발자
    participant GH as GitHub Actions
    participant Runner as Runner
    participant Repo as Repository
    participant Secret as DOTENV_FILE Secret
    participant FS as src/main/resources/.env

    Dev->>GH: push / tag
    GH->>Runner: workflow 실행
    Runner->>Repo: checkout
    Note over Runner,Secret: .env 생성 단계 변경
    Runner->>Secret: 읽기 `secrets.DOTENV_FILE`
    Secret-->>Runner: .env 내용 반환
    Runner->>FS: `printf "%s" "$DOTENV_FILE" > src/main/resources/.env`
    Note right of FS: 단일 시크릿으로 .env 생성
    Runner->>Runner: 이후 단계 실행 (변경 없음)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

새싹 하나 통째로 주머니에 넣었네 🥕
네 줄의 발자국이 한 줄로 줄었네 🐇
.env 한 줌에 비밀을 담아
워크플로우는 가벼이 뛰어가네
훌쩍—배포로 달려가자!

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed 제목이 워크플로우 환경변수 관리를 하나의 시크릿으로 통합하는 주요 변경사항을 간결하게 요약하여 변경사항의 핵심을 명확히 전달하고 있습니다.
Linked Issues Check ✅ Passed GitHub Actions 워크플로우 파일에서 4개의 개별 Slack Webhook 시크릿을 DOTENV_FILE 시크릿 하나로 통합하는 변경이 linked issue #23의 주요 개선안과 기대 효과를 충실히 반영하고 있습니다.
Out of Scope Changes Check ✅ Passed PR에 포함된 변경사항은 GitHub Actions 워크플로우 파일 내에서 .env 관리 로직에 한정되어 있으며 linked issue #23의 범위를 벗어나는 불필요한 코드 수정이 없습니다.
Description Check ✅ Passed PR 설명이 템플릿의 Related issue, Work Description, Trouble Shooting 섹션을 모두 포함하고 있으며 변경 내용과 이슈 번호를 명확히 기재하여 요구사항을 충족하고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/#23

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eeb828d and e964b3d.

📒 Files selected for processing (2)
  • .github/workflows/cd.yml (1 hunks)
  • .github/workflows/ci.yml (1 hunks)

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.

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Oct 7, 2025
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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a816d21 and 8d3f43b.

📒 Files selected for processing (1)
  • .github/workflows/cd.yml (1 hunks)

@move-hoon move-hoon merged commit e01be0b into main Oct 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: 환경변수 관리 방식 단순화

2 participants