Skip to content

Conversation

@mafreud
Copy link
Contributor

@mafreud mafreud commented Oct 5, 2025

Summary by CodeRabbit

  • チョア
    • Firebase Functions のデプロイ手順を再利用可能なワークフローに統合し、重複を排除。
    • 開発/本番環境のシークレット命名を整理し、環境ごとの設定を明確化。
    • CI 内でのビルド・テスト・デプロイのフローを共通化し、信頼性と可視性を向上。ユーザー向け機能の変更はありません。

@linear
Copy link

linear bot commented Oct 5, 2025

OP-299 Refactor CI

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 5, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

既存のFirebase Functionsデプロイ手順を共通の再利用可能ワークフローに集約。github-apps-cd.ymlのdev/productionジョブは新規reusable-deploy-firebase-functions.ymlを呼び出し、環境ごとのシークレット名を再マッピング。チェックアウト/Node設定/認証/ビルド/テスト/デプロイは共通ワークフローへ移動。

Changes

Cohort / File(s) Change Summary
GitHub Actions: CDワークフロー呼び出し変更
\.github/workflows/github-apps-cd.yml
dev/prodジョブのインライン手順を削除し、新規再利用可能ワークフローを呼び出すように変更。devはGHA_SERVICE_ACCOUNT_PREVIEW_FUNCSgha_service_accountFIREBASE_PROJECT_ID_FOR_PREVIEW_FUNCTIONSfirebase_project_idにマップ。prodはGHA_SERVICE_ACCOUNT/FIREBASE_PROJECT_IDをマップ。
GitHub Actions: 再利用可能ワークフロー追加
\.github/workflows/reusable-deploy-firebase-functions.yml
Firebase Functions用の再利用可能ワークフローを追加。必須シークレットgha_service_account/firebase_project_idを定義し、openci-runner/firebase/functionsを作業ディレクトリにして checkout → Nodeセットアップ(.nvmrc)→google-github-actions/auth(credentials_json)→npm cinpm run buildnpm testfirebase-toolsでデプロイを実行。

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Dev as Developer
  participant GH as GitHub Actions\n(github-apps-cd.yml)
  participant RW as Reusable Workflow\n(reusable-deploy-firebase-functions.yml)
  participant Auth as Google Auth
  participant FB as Firebase Project

  Dev->>GH: push/merge (dev or prod)
  GH->>RW: invoke (secrets: gha_service_account, firebase_project_id)
  RW->>RW: checkout → setup-node(.nvmrc) → npm ci → build → test
  RW->>Auth: google-github-actions/auth (credentials_json)
  Auth-->>RW: auth token
  RW->>FB: firebase-tools deploy --project ${firebase_project_id}
  FB-->>RW: deploy result
  RW-->>GH: job status
  GH-->>Dev: workflow result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

ぴょんと跳ねて、ワークフローをひとまとめ
シークレットはそっと箱へお引っ越し
ビルドとテストを並べてパレード🎶
雲へ放つ関数、道筋は一筆書き
にんじん片手に、デプロイお祝いだよ 🥕🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed タイトルはFirebaseデプロイ手順を再利用可能なワークフローに統合するという本変更の主旨を簡潔かつ明確に示しており、不要な情報や曖昧さもなく適切です。
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f8336b1 and 91f068e.

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 4f7d52e and f8336b1.

📒 Files selected for processing (2)
  • .github/workflows/github-apps-cd.yml (1 hunks)
  • .github/workflows/reusable-deploy-firebase-functions.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/github-apps-cd.yml

12-12: reusable workflow call ".github/workflows/reusable-deploy-firebase-functions.yml" at "uses" is not following the format "owner/repo/path/to/workflow.yml@ref" nor "./path/to/workflow.yml". see https://docs.github.com/en/actions/learn-github-actions/reusing-workflows for more details

(workflow-call)


19-19: reusable workflow call ".github/workflows/reusable-deploy-firebase-functions.yml" at "uses" is not following the format "owner/repo/path/to/workflow.yml@ref" nor "./path/to/workflow.yml". see https://docs.github.com/en/actions/learn-github-actions/reusing-workflows for more details

(workflow-call)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants