Auto-detect mode/deployment from the trigger; add deployment report and registry #1

Merged
geusebio merged 1 commit from claude/endpoints-deployment-report-pr-91fdff into main 2026-08-25 23:32:27 +00:00
Owner

Summary

  • mode and deployment are now inferred from the triggering event when left unset: pull_request → pr-<number> up/down, push of production-tag (default prod) → production, push to staging-branch (default: repo default branch) → staging, push to any other branch → sanitized branch name. A push that deletes the ref tears the matching environment down.
  • One job in a consuming workflow can now cover PR previews, staging, production and per-branch environments with zero per-trigger config — see the README quick start.
  • After sc deploy, the action fetches the deployment's live endpoints (GET /cli/applications/{slug}/endpoints) and posts/updates a PR comment with them.
  • README trimmed to a short quick start; the fuller resolution rules, deployment-report internals and an "explicit control" (separate-jobs) example moved to docs/reference.md.
  • Added docs/registry.md tracking which apps use this action and how each is configured.

Test plan

  • YAML/shellcheck validated locally (composite steps have no new lint issues beyond the pre-existing ${{ }} expression noise)
  • Resolution logic dry-run against PR open/sync/close, push-to-main, push-of-prod-tag, messy branch name, and branch/tag deletion scenarios
  • Live verification once merged: watch the first real up/down runs on niall-chat, untitled-nomad-game and example-app after they're migrated to the new workflow
## Summary - `mode` and `deployment` are now inferred from the triggering event when left unset: pull_request → `pr-<number>` up/down, push of `production-tag` (default `prod`) → `production`, push to `staging-branch` (default: repo default branch) → `staging`, push to any other branch → sanitized branch name. A push that deletes the ref tears the matching environment down. - One job in a consuming workflow can now cover PR previews, staging, production and per-branch environments with zero per-trigger config — see the README quick start. - After `sc deploy`, the action fetches the deployment's live endpoints (`GET /cli/applications/{slug}/endpoints`) and posts/updates a PR comment with them. - README trimmed to a short quick start; the fuller resolution rules, deployment-report internals and an "explicit control" (separate-jobs) example moved to `docs/reference.md`. - Added `docs/registry.md` tracking which apps use this action and how each is configured. ## Test plan - [ ] YAML/shellcheck validated locally (composite steps have no new lint issues beyond the pre-existing `${{ }}` expression noise) - [ ] Resolution logic dry-run against PR open/sync/close, push-to-main, push-of-prod-tag, messy branch name, and branch/tag deletion scenarios - [ ] Live verification once merged: watch the first real `up`/`down` runs on niall-chat, untitled-nomad-game and example-app after they're migrated to the new workflow
One job can now cover PR previews, staging, production and per-branch
environments with no per-trigger mode/deployment config — resolve infers
both from the event, and a push that deletes a ref tears the matching
environment down the same way a closed PR already did.

Also posts a PR comment reporting the deployment's live endpoints
(GET /cli/applications/{slug}/endpoints), and adds docs/registry.md to
track which apps actually use this action.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Grey.ooo/someones.computer_pr-environment-action!1
No description provided.