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.

P2 Badge Restrict manual deploys to main

With this bare workflow_dispatch, a maintainer can choose any branch/ref in the manual “Run workflow” UI; this job later checks out that selected ref and deploys the resulting ${GITHUB_SHA} image to the Cloud Run environments. That bypasses the previous push trigger's main-only deployment restriction, so a feature branch can be manually promoted to production unless the workflow gates github.ref == 'refs/heads/main' or otherwise validates the selected ref.

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 this workflow_dispatch trigger, a repo writer can manually run the workflow against any branch (GitHub documents the Branch dropdown/--ref behavior: https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manually-run-a-workflow). I checked this workflow’s deploy path: it checks out the dispatched ref and then builds/deploys ${GITHUB_SHA} to the configured Cloud Run services, so selecting an unmerged feature branch can deploy non-main code to the paper/HK/SG environments despite the existing push trigger being limited to main; add a job/step guard such as github.ref == 'refs/heads/main' if manual deploys are meant to match the production path.

Useful? React with 👍 / 👎.


env:
GCP_PROJECT_ID: longbridgequant
Expand Down