CI: Cloud Run への自動デプロイ (GitHub Actions) - #2
Open
abe-tetsu wants to merge 1 commit into
Open
Conversation
- Auto-deploy changed services (api/overlay/console) on push to main, plus manual workflow_dispatch - Authenticate to GCP via Workload Identity Federation (keyless) - Run go test before deploying the API - Document required GitHub Secrets in README Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
mainへの push で Cloud Run へ自動デプロイする GitHub Actions を追加する。#1(リファクタ)に積み上げた PR で、base はrefactor/cleanup。#1マージ後に main へ向き直る。内容
.github/workflows/deploy.ymlを追加mainへの push で、変更のあったサービス(api / overlay / console)だけをデプロイ(dorny/paths-filterで判定)workflow_dispatchによる手動実行も可(全サービス対象)go test ./...を実行make deploy-*と同一有効化に必要な事前設定(リポジトリ外)
GCP 側(Workload Identity プール/プロバイダ + デプロイ用 SA + IAM)と、以下の GitHub Secrets が必要:
GCP_WIF_PROVIDERGCP_SERVICE_ACCOUNTSUBNOTIFY_YOUTUBE_CLIENT_IDSUBNOTIFY_YOUTUBE_CLIENT_SECRET設定手順はチャットで共有済み。
レビュー時の補足
mainへの push で発火するため、main にマージされて初めて有効になる🤖 Generated with Claude Code