Add manual Cloud Run deploy dispatch#46
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ab0c21e0d4
ℹ️ 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".
| on: | ||
| push: | ||
| branches: [ main ] | ||
| workflow_dispatch: |
There was a problem hiding this comment.
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 👍 / 👎.
Summary\n- allow the Firstrade Cloud Run deploy workflow to be triggered manually from GitHub Actions\n\n## Validation\n- git diff --check\n- npx --yes prettier@3.3.3 --check .github/workflows/sync-cloud-run-env.yml (existing formatting warnings only)