From 5dad58a33bede7ea3393190012c867af94e87d56 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Sat, 28 Nov 2026 23:00:25 -0800 Subject: [PATCH] docs(github): install ob with labstack/setup-onebox Co-Authored-By: Claude Opus 5.5 --- .../guides/deploy-from-github-actions.mdx | 27 +++++++------------ 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/site/src/content/docs/docs/guides/deploy-from-github-actions.mdx b/site/src/content/docs/docs/guides/deploy-from-github-actions.mdx index cf58253f..26bfa66b 100644 --- a/site/src/content/docs/docs/guides/deploy-from-github-actions.mdx +++ b/site/src/content/docs/docs/guides/deploy-from-github-actions.mdx @@ -29,9 +29,8 @@ the project's secrets, such as a SOPS age key. On a self-hosted runner the job uses the runner user's `~/.ssh` and agent, so `ob deploy` behaves as it does in that user's shell. The runner also needs -`git`, `gh`, `jq` and `sha256sum`, which a self-hosted machine does not always have; -GitHub-hosted runners include them. The install step below fetches the -`linux_amd64` build; use `linux_arm64` on an ARM runner. +`git`, `gh` and `jq`, which a self-hosted machine does not always have; +GitHub-hosted runners include them. ## Who can deploy @@ -73,22 +72,16 @@ GitHub offers required reviewers on private repositories only with GitHub Enterprise. On Free, Pro and Team, a private repository uses Onebox approval. Inputs reach the scripts through `env`, never pasted into them with `${{ }}`, -so an input cannot run as shell. Both workflows below install `ob` the same way and run on a runner labelled -`deploy`: +so an input cannot run as shell. Both workflows below install `ob` with +[`labstack/setup-onebox`](https://github.com/labstack/setup-onebox), which +downloads the release for the runner's OS and architecture, checks it against +the release's checksums, and puts `ob` on `PATH`. Pin it by commit, with the +release as a comment, and pin the Onebox version a deploy uses: ```yaml -- name: Install ob - env: - GH_TOKEN: ${{ github.token }} - VERSION: 2026.11.4-alpha - run: | - asset="onebox_${VERSION}_linux_amd64.tar.gz" - gh release download "v${VERSION}" -R labstack/onebox \ - -p "$asset" -p "onebox_${VERSION}_checksums.txt" - grep " ${asset}$" "onebox_${VERSION}_checksums.txt" | sha256sum -c - - tar -xzf "$asset" ob - install -m 0755 ob "$RUNNER_TEMP/ob" - echo "$RUNNER_TEMP" >> "$GITHUB_PATH" +- uses: labstack/setup-onebox@70b22ea24ef456027bb46854737bc2d1ac375e88 # v2026.11.0-alpha + with: + version: 2026.11.5-alpha ``` ## Onebox approval: any repository