Skip to content

feat(github): report deploys to GitHub deployments - #245

Merged
vishr merged 2 commits into
mainfrom
feat/github-deployments
Nov 29, 2026
Merged

vishr merged 2 commits into
mainfrom
feat/github-deployments

Conversation

@vishr

@vishr vishr commented Nov 29, 2026

Copy link
Copy Markdown
Member

Closes #244.

What

ob deploy, ob rollback, ob resume and ob abort report to GitHub deployments from wherever ob runs (laptop, agent, Actions runner). Opt in with:

spec:
  github:
    repository: owner/name

Which commit

Decided at plan time and bound into the plan digest:

  • Workload images whose org.opencontainers.image.source names the repository report their org.opencontainers.image.revision, one GitHub environment per image repository (production (shop-web)), so multi-image releases such as monk never claim a single commit. Names always carry a component, as Vercel's do, so they don't change when a project adds an image.
  • A configuration-only repository reports a clean checkout's commit, only if the checkout is a clone of that repository.
  • Anything uncertain (dirty tree, unreadable image, ambiguous revision) reports nothing.
  • Commits are recorded on the deploy's start journal record, so rollback, resume and abort report the right release.

Safety

  • Fail-open: warnings only. One 15s budget per report phase; creates are not retried after GitHub may have acted (no duplicate deployments).
  • Token resolved locally (tokenEnv → GH_TOKEN → GITHUB_TOKEN → gh auth token), never sent to the host. A github.com token is never sent to a non-github.com apiUrl.
  • A deploy is announced only after the host journal records its start (new engine release progress event), so lock-refused or no-op deploys are never reported.

Also

  • ONEBOX_OPERATOR, and GITHUB_TRIGGERING_ACTOR in Actions, name the operator in journals and reports.
  • github.apiUrl for GitHub Enterprise Server and ghe.com.
  • Guides: GitHub deployments; deploying from GitHub Actions (Onebox approval across two runs for private repos without required reviewers; GitHub reviewers with environment.deployment: false; who can deploy once a runner holds keys).

Review

Design reviewed and approved by an independent reviewer against 2026 GitHub, Vercel and Docker docs; implementation reviewed twice and an automated security review addressed. just check, just lint and go test -race ./... pass locally.

Not yet verified live: behaviour against a protected GitHub environment.

🤖 Generated with Claude Code

vishr and others added 2 commits November 28, 2026 22:18
Report deploy, rollback, resume and abort to a repository's GitHub
deployments, so they show in its Environments tab and reach tools that
read deployment statuses, wherever ob runs: a laptop, an agent or a
GitHub Actions runner. Opt in with spec.github.repository.

The commit is decided at plan time and bound into the plan digest. A
workload image whose org.opencontainers.image.source label names the
repository reports its org.opencontainers.image.revision, in its own
GitHub environment named like "production (shop-web)", so a release
that ships images built at different commits never claims one commit
for all of them. A configuration-only repository reports a clean
checkout's commit when the checkout is a clone of that repository.
Anything uncertain reports nothing. Commits ride on the deploy's start
journal record so a rollback reports the release it restores.

Reporting is fail-open. The token is read where ob runs and never
reaches the host; a github.com token is never sent to another apiUrl.
A deploy is announced only after the host records its start, creates
are not retried after GitHub may have acted, and a dead GitHub delays
the end of a command by at most 15 seconds.

Also: ONEBOX_OPERATOR, and the triggering actor in GitHub Actions,
name the operator; github.apiUrl supports GitHub Enterprise; and new
guides cover GitHub deployments and deploying from GitHub Actions with
either Onebox approval or GitHub required reviewers.

Closes #244

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A project file named both where a token goes (github.apiUrl) and which
variable supplies it (github.tokenEnv), so a hostile project file could
send any secret in the operator's environment to a host it chose.

A non-default apiUrl now receives a token only when the operator's own
ONEBOX_GITHUB_API_URL names the same URL, and tokenEnv must be a GitHub
token variable: upper case, containing GH or GITHUB, ending in TOKEN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vishr
vishr merged commit a3fda78 into main Nov 29, 2026
6 checks passed
@vishr
vishr deleted the feat/github-deployments branch November 29, 2026 06:27
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.

feat(notify): report deploys to GitHub deployments

1 participant