Skip to content

Add GitHub Actions Cloud Run deploy path#96

Merged
Pigbibi merged 1 commit into
mainfrom
chore/github-actions-cloud-run-deploy
May 27, 2026
Merged

Add GitHub Actions Cloud Run deploy path#96
Pigbibi merged 1 commit into
mainfrom
chore/github-actions-cloud-run-deploy

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a Dockerfile so GitHub Actions can build a deployable Cloud Run image
  • add an opt-in ENABLE_GITHUB_CLOUD_RUN_DEPLOY path alongside the existing env sync path
  • derive Artifact Registry hostname from CLOUD_RUN_REGION unless explicitly configured, which keeps HK/SG deployments region-aware

Validation

  • git diff --check
  • npx prettier --check parsed the workflow; it reported formatting warnings only, so I did not rewrite the whole workflow

Rollout

  • leave existing Cloud Build triggers enabled until one GitHub Actions deploy is verified
  • then set ENABLE_GITHUB_CLOUD_RUN_DEPLOY=true per GitHub Environment and disable the old triggers

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49b6c677a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

--memory=512Mi \
--cpu=1 \
--timeout=300s \
--labels="managed-by=github-actions,commit-sha=${GITHUB_SHA},github-run-id=${GITHUB_RUN_ID},deployment-label=${deployment_label}" \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Put the commit label where the wait step reads it

When ENABLE_GITHUB_CLOUD_RUN_DEPLOY=true and ENABLE_GITHUB_ENV_SYNC=true, this deploy writes commit-sha with gcloud run deploy --labels, but the next step waits on spec.template.metadata.labels.commit-sha. Cloud Run documents --labels as service metadata labels, while revision labels live under spec.template.metadata.labels (see https://cloud.google.com/run/docs/configuring/services/labels), so the wait loop never sees the SHA from this deploy and times out before syncing env vars. Either query the service metadata label here or set the label on the revision template before the wait.

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi merged commit 38351eb into main May 27, 2026
1 check passed
@Pigbibi Pigbibi deleted the chore/github-actions-cloud-run-deploy branch May 27, 2026 04:17
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