Skip to content

ci: fix environment detection for workflow_dispatch#25

Merged
SethPaul merged 1 commit into
mainfrom
gh_7632-fix_workflow_dispatch_env
Mar 11, 2026
Merged

ci: fix environment detection for workflow_dispatch#25
SethPaul merged 1 commit into
mainfrom
gh_7632-fix_workflow_dispatch_env

Conversation

@SethPaul
Copy link
Copy Markdown
Collaborator

@SethPaul SethPaul commented Mar 11, 2026

Summary

  • Change lambda_flow.yml environment logic from checking github.event_name == push to checking github.ref == refs/heads/main
  • This correctly maps workflow_dispatch on main to prod (previously resulted in empty environment, falling through to default)
  • Matches the pattern already used in pylibs_flow.yml
  • Adds explicit default fallback for non-main branches

Context: Companion to hipponot/microservices PR that removes auto-deploy on push to main. This fix ensures manual workflow_dispatch correctly targets prod.

Test plan

  • Verify workflow_dispatch on main sets deploy_environment=prod
  • Verify PR events still set deploy_environment=qa (or default for drafts)
  • Verify non-main branch dispatch sets deploy_environment=default

Summary by CodeRabbit

  • Chores
    • Updated deployment pipeline configuration to trigger production deployments based on main branch activities rather than general push events, improving deployment consistency.

…b.ref instead of github.event_name to determine deploy environment. This correctly maps workflow_dispatch on main to prod (previously resulted in empty environment). Matches the pattern already used in pylibs_flow.yml. Session: claude -r 1b942263-65e5-41f0-b445-cc9a1b3f3cd8
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 11, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0e66051e-264f-4ca3-b1ec-689b3dacc50b

📥 Commits

Reviewing files that changed from the base of the PR and between 26d8968 and 6541775.

📒 Files selected for processing (1)
  • .github/workflows/lambda_flow.yml

Walkthrough

Updated GitHub Actions workflow deployment logic to trigger production deployment when pushing to the main branch instead of on any push event, and added a default fallback environment variable.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/lambda_flow.yml
Modified set_environment step to check for github.ref == "refs/heads/main" instead of github.event_name == "push" for prod deployment. Added else clause to default deploy_environment to "default". Updated comment to clarify deployment behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: fixing environment detection for workflow_dispatch events by replacing event_name logic with ref-based logic.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gh_7632-fix_workflow_dispatch_env

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@SethPaul SethPaul merged commit 5037fdd into main Mar 11, 2026
2 checks passed
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