Skip to content

ci(deploy): scope testnet deploy to a GitHub Environment#47

Draft
rubydusa wants to merge 1 commit into
mainfrom
ramgos/environment-gate-testnet
Draft

ci(deploy): scope testnet deploy to a GitHub Environment#47
rubydusa wants to merge 1 commit into
mainfrom
ramgos/environment-gate-testnet

Conversation

@rubydusa
Copy link
Copy Markdown
Contributor

Closes #41.

Summary

  • Add environment input to _deploy-testnet.yml (default testnet).
  • Add deploy-environment input to _foundry-cicd.yml (default testnet), forwarded to the orchestrator's deploy-testnet job.
  • Deploy job declares environment: ${{ inputs.* }} so consumer repos can require reviewers and scope PRIVATE_KEY to the Environment.
  • README documents how to set up the Environment in the consumer repo.

Why

Closes the gap between docs/specs/... (which calls for "deploy on approved PR to main") and the implementation. Today any PR with deploy-on-pr: true deploys without approval. With this change, the consumer repo's Environment protection rules (required reviewers, branch policy) are the gate.

Behavior change

  • Default consumers must create a testnet Environment in their repo, or runs will sit waiting (or fail with "no environment found", depending on the GH config). This is intended — it's the point of the gate.
  • Consumers who want the previous unscoped behavior can pass environment: '' / deploy-environment: ''.

Test plan

  • All unit tests pass.
  • YAML validates.
  • CI green.
  • Smoke test in a consumer repo with a testnet Environment configured.

🤖 Generated with Claude Code

Add an `environment` input to `_deploy-testnet.yml` and a
`deploy-environment` input to `_foundry-cicd.yml`, both defaulting
to `testnet`. The deploy job declares `environment: ${{ inputs... }}`
so consumer repos can require reviewers and scope `PRIVATE_KEY` to
the Environment.

Empty string opts out for sandbox use.

Closes #41
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.

Gate testnet deploy on a GitHub Environment with required reviewers

1 participant