Skip to content

ci: CI 成功後にのみイメージをビルドする - #289

Merged
sasagar merged 1 commit into
devfrom
fix/ci-gate-image-build
Oct 14, 2026
Merged

sasagar merged 1 commit into
devfrom
fix/ci-gate-image-build

Conversation

@sasagar

@sasagar sasagar commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Closes #288

変更

  • build-images.yml: ci.yml を workflow_call で呼ぶ ci ジョブを追加し、build を needs: ci に。CI が失敗すると :dev / :main / :sha-* / タグイメージは push されず、keel による本番デプロイも起きない
  • ci.yml: push トリガーから dev / main を除外(これらの CI は Build & Push Images 内で実行されるため二重実行を防ぐ)。PR・feature ブランチの CI はこれまで通り

影響

  • dev への push 後、gh run list --workflow CI には dev の実行が出なくなる。dev の CI 結果は「Build & Push Images」の ci / ... ジョブで確認する
  • デプロイまでの時間は CI の所要時間ぶん延びる
  • workflow_call は呼び出し元コミットの ci.yml を使うため、このPRのマージ直後の dev push から有効

https://claude.ai/code/session_01Y29fBeRP344FME6de48wUv

Summary by CodeRabbit

  • CI・ビルド
    • 画像のビルド前にCIを実行し、CIが成功した場合のみビルドするようになりました。
    • dev および main へのプッシュでは、CIワークフローが直接実行されなくなりました。

build-images.yml now calls ci.yml via workflow_call and the build job
needs it, so a failing commit no longer publishes :dev (which keel
auto-deploys). dev/main are excluded from ci.yml's push trigger to
avoid running CI twice.

Closes #288

Claude-Session: https://claude.ai/code/session_01Y29fBeRP344FME6de48wUv
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Love-Rox/rox/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0b9994bb-03dd-4846-85d0-b81c49bf56fa
📥 Commits

Reviewing files that changed from the base of the PR and between 755969e and 6990cc0.

📒 Files selected for processing: 2
  • .github/workflows/build-images.yml
  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

イメージワークフローに ci.yml を呼び出すジョブを追加しました。build ジョブは CI の成功後に実行されます。ci.yml は dev と main への push では直接起動しません。

Changes: イメージビルドの CI ゲート

Layer / File(s) Summary
CI 呼び出しとビルドの順序
.github/workflows/ci.yml, .github/workflows/build-images.yml
ci.yml の push 除外対象に dev と main を追加しました。build-images.yml は再利用可能な CI を呼び出し、build ジョブを CI に依存させます。

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant Push
  participant build-images.yml
  participant ci.yml
  participant build job
  Push->>build-images.yml: イメージワークフローを起動
  build-images.yml->>ci.yml: workflow_call で CI を実行
  ci.yml-->>build-images.yml: CI の結果を返す
  build-images.yml->>build job: CI 成功後に実行
Loading
Merge Risk: ⚪ Minimal · up to 6990c

The CI-gated image build has no identified outstanding issue; it is ready for normal merge checks.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed タイトルは、CI成功後にのみイメージをビルドするという変更の主目的を正確かつ簡潔に示しています。
Linked Issues check Passed Issue #288 の要件を満たします。.github/workflows/build-images.yml はローカルの ci.yml を workflow_call で ci ジョブとして実行します。build ジョブは needs: ci を持つため、CI が成功するまでイメージをビルドして push しません。.github/workflows/ci.yml …
Out of Scope Changes check Passed 変更は Issue #288 の対象である CI の実行経路とイメージ公開ゲートに限定されています。追加されたコメントは、この動作の説明です。対象外の実装変更は確認できません。
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@sasagar
sasagar merged commit 1f88657 into dev Oct 14, 2026
11 checks passed
This was referenced Oct 14, 2026
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.

1 participant