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 workflow_dispatch here lets an operator choose a ref when starting the run (gh workflow run ... --ref / UI branch selector); GitHub documents that for workflow_dispatch, GITHUB_SHA is the last commit on the dispatched GITHUB_REF branch or tag. Since this workflow immediately checks out, builds, pushes, and deploys ${GITHUB_SHA} to Cloud Run without a github.ref == 'refs/heads/main' guard, a manual run from any branch can deploy unmerged code even though the push trigger was limited to main.

Useful? React with 👍 / 👎.


env:
GCP_PROJECT_ID: firstradequant
Expand Down