Repository navigation
feat(github): report deploys to GitHub deployments - #245
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #244.
What
ob deploy,ob rollback,ob resumeandob abortreport to GitHub deployments from whereverobruns (laptop, agent, Actions runner). Opt in with:Which commit
Decided at plan time and bound into the plan digest:
org.opencontainers.image.sourcenames the repository report theirorg.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.Safety
tokenEnv→GH_TOKEN→GITHUB_TOKEN→gh auth token), never sent to the host. A github.com token is never sent to a non-github.comapiUrl.releaseprogress event), so lock-refused or no-op deploys are never reported.Also
ONEBOX_OPERATOR, andGITHUB_TRIGGERING_ACTORin Actions, name the operator in journals and reports.github.apiUrlfor GitHub Enterprise Server and ghe.com.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 lintandgo test -race ./...pass locally.Not yet verified live: behaviour against a protected GitHub environment.
🤖 Generated with Claude Code