Skip to content

chore: Github Action CD 환경 구축#110

Merged
easyhooon merged 4 commits intodevelopfrom
BOOK-223-chore/#108
Aug 5, 2025
Merged

chore: Github Action CD 환경 구축#110
easyhooon merged 4 commits intodevelopfrom
BOOK-223-chore/#108

Conversation

@easyhooon
Copy link
Copy Markdown
Contributor

@easyhooon easyhooon commented Aug 5, 2025

🔗 관련 이슈

📙 작업 설명

  • Firebase App Distribution 기반 CD 환경 구축

🧪 테스트 내역 (선택)

  • 주요 기능 정상 동작 확인
  • 브라우저/기기에서 동작 확인
  • 엣지 케이스 테스트 완료
  • 기존 기능 영향 없음

💬 추가 설명 or 리뷰 포인트 (선택)

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores
    • Android 프로젝트의 지속적 배포를 자동화하는 새로운 GitHub Actions 워크플로우가 추가되었습니다.
    • Android CI 워크플로우에서 비밀 키 파일 생성 방식이 base64 디코딩 방식으로 개선되었습니다.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 5, 2025

Walkthrough

Android 프로젝트의 지속적 배포(CD)를 자동화하는 새로운 GitHub Actions 워크플로우가 추가되었습니다. 이 워크플로우는 main 브랜치로의 PR에 대해 실행되며, 빌드, 아티팩트 업로드, GitHub Release 생성, Firebase App Distribution 배포를 포함합니다. 또한, Gradle 플러그인 내부의 Android 관련 설정 일부가 제거되었습니다.

Changes

Cohort / File(s) Change Summary
Android CD GitHub Actions 워크플로우 추가
.github/workflows/android-cd.yml
Android 앱의 CD 자동화를 위한 새로운 워크플로우 파일 추가. 빌드, 배포, 릴리즈 자동화 단계 포함.
Android 플러그인 설정 수정
build-logic/src/main/kotlin/AndroidRetrofitConventionPlugin.kt
LibraryExtension 관련 설정 및 defaultConfig.targetSdk 지정 코드 제거. 나머지 플러그인/의존성 로직 유지.
Android CI 워크플로우 수정
.github/workflows/android-ci.yml
local.propertieskeystore.properties 파일 생성 시 base64 디코딩 방식으로 변경하여 보안 및 간결성 향상.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant Gradle
    participant Firebase App Distribution
    participant GitHub Releases

    Developer->>GitHub Actions: PR to main branch
    GitHub Actions->>GitHub Actions: Checkout code & set up JDK
    GitHub Actions->>GitHub Actions: Generate secrets files
    GitHub Actions->>GitHub Actions: Extract app version
    GitHub Actions->>Gradle: Build release AAB
    Gradle-->>GitHub Actions: Return build artifact
    GitHub Actions->>GitHub Releases: Create release with notes
    GitHub Actions->>Firebase App Distribution: Upload AAB & release notes
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
CD workflow 구성 (#108)
Firebase App Distribution 연동 (#108)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Android 플러그인 내 LibraryExtensiondefaultConfig.targetSdk 설정 제거 (build-logic/src/main/kotlin/AndroidRetrofitConventionPlugin.kt) CD 환경 구축 및 Firebase 배포와 직접적인 관련이 없어 보임. 설정 변경이지만, linked issue의 범위를 벗어남.

Poem

🐰
깃헙 액션이 춤을 추네,
안드로이드 빌드가 자동으로 되네!
파이어베이스로 앱이 날아가고,
릴리즈 노트도 척척 써주네.
토끼는 오늘도 기뻐하며,
자동화 세상에 귀 쫑긋 세웠네!
🚀✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BOOK-223-chore/#108

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@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 (2)
.github/workflows/android-cd.yml (2)

43-53: 버전 추출 로직이 파일 구조·코딩 스타일 변경에 취약합니다
고정 경로와 단순 grep + sed 정규식은 라인이 분리되거나 주석이 포함될 경우 실패합니다. gradle -q :app:printVersionName처럼 Gradle task를 통해 버전을 가져오거나, VERSION_NAMEgradle.properties에 두어 cat으로 읽는 방식을 고려해 보세요.


16-24: Gradle 캐시 미사용으로 빌드 시간이 불필요하게 길어집니다
actions/setup-java 다음에 gradle-build-action(caching ON)을 추가하면 의존성·작업 캐시가 자동으로 재사용되어 CI 시간을 크게 단축할 수 있습니다.
예)

- uses: gradle/gradle-build-action@v3
  with:
    cache-read-only: false
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6698a94 and bf7e0aa.

📒 Files selected for processing (2)
  • .github/workflows/android-cd.yml (1 hunks)
  • build-logic/src/main/kotlin/AndroidRetrofitConventionPlugin.kt (0 hunks)
💤 Files with no reviewable changes (1)
  • build-logic/src/main/kotlin/AndroidRetrofitConventionPlugin.kt
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/android-cd.yml

96-96: the runner of "softprops/action-gh-release@v1" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci-build
🔇 Additional comments (1)
.github/workflows/android-cd.yml (1)

7-11: CD 트리거가 pull_request로 설정돼 실제 배포 시점이 PR 머지 전입니다
병합되지 않은 브랜치의 아티팩트·릴리스를 태그/배포하도록 되어 있어 버전 충돌·불필요한 테스터 노출 위험이 있습니다. 의도된 시나리오인지 확인해 주세요. 일반적으로는 push: branches: [main] 또는 workflow_dispatch로 운영합니다.

Comment thread .github/workflows/android-cd.yml
Comment thread .github/workflows/android-cd.yml
Copy link
Copy Markdown
Contributor

@seoyoon513 seoyoon513 left a comment

Choose a reason for hiding this comment

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

이 부분은 믿음으로 가겠습니다 LGTM~

@easyhooon easyhooon merged commit b430c06 into develop Aug 5, 2025
3 of 4 checks passed
@easyhooon easyhooon deleted the BOOK-223-chore/#108 branch August 5, 2025 08:38
Copy link
Copy Markdown

@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

🧹 Nitpick comments (2)
.github/workflows/android-cd.yml (2)

7-11: PR 이벤트에서 CD 실행 여부 재검토 필요

pull_request 이벤트는 PR 병합 전에 실행됩니다.
외부 포크 PR에서는 시크릿이 주입되지 않아 빌드가 스킵되며, 내부 브랜치라도 병합 전 실제 릴리스·Firebase 배포가 발생해 버전 충돌이나 불필요한 배포 위험이 있습니다. 보통 CD 워크플로는 push 또는 workflow_run(main 병합 후)으로 트리거하는 패턴이 더 안전합니다. 트리거 조건을 다시 확인해 주세요.


100-107: Firebase 배포 액션 런타임 버전 확인 권장

wzieba/Firebase-Distribution-Github-Action@v1이 Node 12 런타임을 사용 중일 가능성이 있습니다. GitHub-hosted runner의 Node 12 지원 중단 시 워크플로 실패가 발생할 수 있으니, 최신 메이저 버전(예: @v2) 또는 커밋 SHA로 고정해 두는 방안을 검토해 주세요.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf7e0aa and 2b3d194.

📒 Files selected for processing (2)
  • .github/workflows/android-cd.yml (1 hunks)
  • .github/workflows/android-ci.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/android-ci.yml
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/android-cd.yml

97-97: input "release_name" is not defined in action "softprops/action-gh-release@v2". available inputs are "append_body", "body", "body_path", "discussion_category_name", "draft", "fail_on_unmatched_files", "files", "generate_release_notes", "make_latest", "name", "prerelease", "preserve_order", "repository", "tag_name", "target_commitish", "token"

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: ci-build
🔇 Additional comments (1)
.github/workflows/android-cd.yml (1)

32-36: 시크릿 평문 노출 위험 해결 확인

local.properties / keystore.properties를 Base64 디코딩 방식으로 생성하도록 변경해 이전 리뷰에서 지적된 평문 노출 위험이 사라졌습니다. 👍

Comment on lines +94 to +99
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.extract_version.outputs.version }}
release_name: ${{ steps.extract_version.outputs.version }}
generate_release_notes: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue

release_name 입력 파라미터는 v2에서 지원되지 않습니다

softprops/action-gh-release@v2에서는 release_name 대신 name 입력을 사용합니다. 그대로 두면 워크플로가 “input not defined” 오류로 실패합니다.

-                    release_name: ${{ steps.extract_version.outputs.version }}
+                    name: ${{ steps.extract_version.outputs.version }}
📝 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: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.extract_version.outputs.version }}
release_name: ${{ steps.extract_version.outputs.version }}
generate_release_notes: true
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.extract_version.outputs.version }}
name: ${{ steps.extract_version.outputs.version }}
generate_release_notes: true
🧰 Tools
🪛 actionlint (1.7.7)

97-97: input "release_name" is not defined in action "softprops/action-gh-release@v2". available inputs are "append_body", "body", "body_path", "discussion_category_name", "draft", "fail_on_unmatched_files", "files", "generate_release_notes", "make_latest", "name", "prerelease", "preserve_order", "repository", "tag_name", "target_commitish", "token"

(action)

🤖 Prompt for AI Agents
In .github/workflows/android-cd.yml around lines 94 to 99, the release_name
input parameter is not supported by softprops/action-gh-release@v2 and causes an
"input not defined" error. Replace the release_name parameter with name, keeping
the same value from steps.extract_version.outputs.version to fix the workflow
failure.

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.

[BOOK-223/chore] Github Action CD 환경 구축

2 participants