Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/sync-cloud-run-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Deploy Cloud Run
on:
push:
branches: [ main ]
workflow_dispatch:

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 Restrict manual deploys to main

Adding an unrestricted workflow_dispatch lets an operator manually run this production deploy workflow from any selectable ref, while the job later builds and deploys ${GITHUB_SHA} to the fixed Cloud Run project/service. In the scenario where a feature branch or tag is selected in the Run workflow UI/CLI, this bypasses the previous push-only-on-main constraint and can deploy unmerged code; add a job-level guard such as github.ref == 'refs/heads/main' or otherwise validate the ref before checkout/deploy.

Useful? React with 👍 / 👎.

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 Restrict manual deploys to main

With workflow_dispatch enabled here, anyone with permission to run the workflow can choose a non-main ref for the manual run, and this job has no later github.ref guard before actions/checkout, docker build, and gcloud run deploy. In that scenario the selected branch's code is built and deployed to Cloud Run even though the previous deploy trigger was limited to pushes on main, so a feature branch can bypass the normal merge path into production.

Useful? React with 👍 / 👎.


env:
GCP_PROJECT_ID: interactivebrokersquant
Expand Down