Conversation
WalkthroughGitHub Actions 워크플로우 .github/workflows/android_cd.yml에 workflow_dispatch 트리거가 추가되어, 기존 push 및 pull_request 외에 수동 실행이 가능해졌습니다. 워크플로우의 나머지 단계와 동작은 변경되지 않았습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant GH as GitHub Actions
participant Job as Android CD Jobs
rect rgba(200,230,255,0.3)
note over Dev,GH: 수동 실행 경로 (신규)
Dev->>GH: Run workflow (workflow_dispatch)
GH->>Job: Trigger Android CD workflow
Job-->>GH: Execute steps (unchanged)
GH-->>Dev: Report status/results
end
par 기존 트리거
note over GH: push / pull_request
end
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/android_cd.yml (2)
3-11: 수동 실행 시 브랜치 가드 부재 → release/ 외 브랜치에서 배포 가능**workflow_dispatch는 브랜치 필터가 없어, UI에서 실수로 다른 브랜치를 선택해도 배포가 진행됩니다. 배포 오염 방지를 위해 release/** 가드 및 입력 파라미터를 추가하세요.
적용 제안(diff):
on: push: branches: - 'release/**' pull_request: branches: - 'release/**' - workflow_dispatch: + workflow_dispatch: + inputs: + target_branch: + description: '배포할 release 브랜치 (release/...)' + required: true + type: string + release_notes: + description: '릴리즈 노트' + required: false + type: string + tester_groups: + description: '배포 그룹(쉼표 구분)' + required: false + default: 'orbit-tester-group' + type: string + +permissions: + contents: read + +concurrency: + group: cd-${{ github.ref_name }} + cancel-in-progress: false
84-85: curl | bash 원격 스크립트 실행은 공급망 리스크 큼 → 버전 고정 설치로 전환원격 스크립트 파이프 실행은 취약합니다. Node를 설정하고 firebase-tools를 버전 고정으로 설치하세요.
+# 10. Install Node.js (for Firebase CLI) +- name: Set up Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: '20' - -# 10. Install Firebase CLI -- name: Install Firebase CLI - run: curl -sL https://firebase.tools | bash +# 10. Install Firebase CLI (pinned) +- name: Install Firebase CLI + run: npm i -g firebase-tools@13필요 시 버전은 팀이 관리하는 변수/inputs로 고정하세요.
🧹 Nitpick comments (7)
.github/workflows/android_cd.yml (7)
12-16: 배포 잡에 가드/타임아웃/환경 보호 추가 권장실수 방지, 무한 대기 방지, 환경 승인 흐름을 위해 아래를 권장합니다.
jobs: cd: name: Continuous Deployment runs-on: ubuntu-latest + if: startsWith(github.ref_name, 'release/') + timeout-minutes: 30 + environment: + name: production(organization 환경 보호 규칙에 ‘Required reviewers’를 걸어두면 수동 실행도 승인 게이트가 적용됩니다.)
19-21: 수동 실행 시 체크아웃 ref 고정UI 입력으로 선택한 target_branch를 강제 사용해 빌드 일관성을 높이세요.
- name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target_branch || github.ref }}
22-31: Gradle 캐시 이중화 제거setup-java의 cache: gradle와 actions/cache가 중복됩니다. 한쪽만 유지하세요(권장: setup-java).
-# 2. Cache Gradle -- name: Cache Gradle dependencies - uses: actions/cache@v4 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle-Also applies to: 34-39
45-50: 비밀 값 출력 안정성: echo → printf로 교체echo는 개행/특수문자 이슈가 있어 디코드 실패 가능성이 있습니다.
- run: echo $FIREBASE_SECRET | base64 --decode > app/google-services.json + - run: | + printf '%s' "$FIREBASE_SECRET" | base64 --decode > app/google-services.json
88-101: 릴리즈 노트/그룹을 입력값과 연동수동 배포 입력값을 실제 배포 매개변수에 연결하세요.
firebase appdistribution:distribute app/build/outputs/apk/release/app-release.apk \ --app "$FIREBASE_APP_ID" \ - --release-notes "🚀 release 브랜치에서 새 빌드가 업로드되었습니다!" \ - --groups "orbit-tester-group" + --release-notes "${{ github.event.inputs.release_notes || '🚀 release 브랜치에서 새 빌드가 업로드되었습니다!' }}" \ + --groups "${{ github.event.inputs.tester_groups || 'orbit-tester-group' }}"
68-74: 아티팩트 보관기간/식별자 강화용량 관리와 트레이싱을 위해 보관기간과 이름에 브랜치/커밋 포함 권장.
uses: actions/upload-artifact@v4 with: - name: release-apk + name: release-apk-${{ github.ref_name }}-${{ github.sha }} path: app/build/outputs/apk/release/app-release.apk + retention-days: 7
103-111: 배포 성공/실패 모두 알림 + 실행 링크 포함알림에 상태/실행 링크를 포함하고 항상 전송하도록 설정하세요.
- name: Notify Discord + if: always() env: DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + JOB_STATUS: ${{ job.status }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} run: | curl -H "Content-Type: application/json" \ -X POST \ - -d '{"content": "🚀 Firebase App Distribution에 새 APK가 업로드되었습니다!\n🔗 다운로드 링크: https://appdistribution.firebase.google.com"}' \ + -d "{\"content\": \"🚀 Firebase App Distribution에 새 APK가 업로드되었습니다!\n• 상태: ${JOB_STATUS}\n• 실행 링크: ${RUN_URL}\"}" \ $DISCORD_WEBHOOK_URL
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/android_cd.yml(1 hunks)
🔇 Additional comments (1)
.github/workflows/android_cd.yml (1)
10-10: 수동 실행 트리거 추가 LGTMPR 목적(수동 배포 지원)에 정확히 부합합니다. 별도 단계 변경 없이 안전하게 확장됐습니다.
수동 실행 권한(Repository → Actions → General → Workflow permissions / Who can run this workflow)이 팀 정책에 맞게 제한되어 있는지 한 번만 확인 부탁드립니다.
Related issue 🛠
closed #260
어떤 변경사항이 있었나요?
CheckPoint ✅
PR이 다음 요구 사항을 충족하는지 확인하세요.
Work Description ✏️
Uncompleted Tasks 😅
N/A
To Reviewers 📢
Summary by CodeRabbit