docs: add setup-gordon action design spec
- commit
- 1c960358ce008734d031492fe95804252f869cb7
- author
- brice · · 2026-03-19 04:23 UTC
- parent
- f47f9dc
- signature
- unsigned
1 file · +58 -0
A docs/superpowers/specs/2026-03-19-setup-gordon-action-design.md +58 -0
| @@ -0,0 +1,58 @@ | |||
| 1 | + | # Design: `setup-gordon` GitHub Action | |
| 2 | + | ||
| 3 | + | **Date:** 2026-03-19 | |
| 4 | + | **Status:** Approved | |
| 5 | + | ||
| 6 | + | ## Goal | |
| 7 | + | ||
| 8 | + | Composite GitHub Action that installs the Gordon CLI binary into the runner's PATH. Setup only — no execution. | |
| 9 | + | ||
| 10 | + | ## Location | |
| 11 | + | ||
| 12 | + | `.github/actions/setup-gordon/action.yml` | |
| 13 | + | ||
| 14 | + | ## Inputs | |
| 15 | + | ||
| 16 | + | | Input | Default | Description | | |
| 17 | + | |-----------|----------|------------------------------------------| | |
| 18 | + | | `version` | `latest` | Version to install (`v2.0.0`, `latest`) | | |
| 19 | + | ||
| 20 | + | ## Outputs | |
| 21 | + | ||
| 22 | + | | Output | Description | | |
| 23 | + | |-----------|------------------------------------| | |
| 24 | + | | `version` | The version actually installed | | |
| 25 | + | | `path` | Path to the installed binary | | |
| 26 | + | ||
| 27 | + | ## Logic | |
| 28 | + | ||
| 29 | + | 1. Determine runner OS and arch (`linux`/`darwin`, `amd64`/`arm64`) | |
| 30 | + | 2. If `version=latest`, resolve the tag via GitHub API redirect | |
| 31 | + | 3. Download `gordon_{os}_{arch}` from GitHub Releases | |
| 32 | + | 4. Place binary at `/usr/local/bin/gordon`, `chmod +x` | |
| 33 | + | 5. Verify with `gordon version` | |
| 34 | + | ||
| 35 | + | ## Usage | |
| 36 | + | ||
| 37 | + | ```yaml | |
| 38 | + | steps: | |
| 39 | + | - uses: bnema/gordon/.github/actions/setup-gordon@main | |
| 40 | + | with: | |
| 41 | + | version: latest | |
| 42 | + | ||
| 43 | + | - run: gordon push --build --remote "$GORDON_REMOTE" --no-confirm | |
| 44 | + | env: | |
| 45 | + | GORDON_TOKEN: ${{ secrets.GORDON_TOKEN }} | |
| 46 | + | GORDON_REMOTE: ${{ secrets.GORDON_REMOTE }} | |
| 47 | + | ``` | |
| 48 | + | ||
| 49 | + | ## Documentation updates | |
| 50 | + | ||
| 51 | + | - Update `docs/deployment/github-actions.md` to document `setup-gordon` as the recommended approach | |
| 52 | + | ||
| 53 | + | ## Out of scope | |
| 54 | + | ||
| 55 | + | - No Docker login/setup (Gordon handles its own auth) | |
| 56 | + | - No command execution | |
| 57 | + | - No Windows support (Gordon does not build for Windows) | |
| 58 | + | - The existing `.github/actions/deploy/` action remains untouched | |
| @@ -0,0 +1,58 @@ | |||||
| 1 | + | # Design: `setup-gordon` GitHub Action | |||
| 2 | + | ||||
| 3 | + | **Date:** 2026-03-19 | |||
| 4 | + | **Status:** Approved | |||
| 5 | + | ||||
| 6 | + | ## Goal | |||
| 7 | + | ||||
| 8 | + | Composite GitHub Action that installs the Gordon CLI binary into the runner's PATH. Setup only — no execution. | |||
| 9 | + | ||||
| 10 | + | ## Location | |||
| 11 | + | ||||
| 12 | + | `.github/actions/setup-gordon/action.yml` | |||
| 13 | + | ||||
| 14 | + | ## Inputs | |||
| 15 | + | ||||
| 16 | + | | Input | Default | Description | | |||
| 17 | + | |-----------|----------|------------------------------------------| | |||
| 18 | + | | `version` | `latest` | Version to install (`v2.0.0`, `latest`) | | |||
| 19 | + | ||||
| 20 | + | ## Outputs | |||
| 21 | + | ||||
| 22 | + | | Output | Description | | |||
| 23 | + | |-----------|------------------------------------| | |||
| 24 | + | | `version` | The version actually installed | | |||
| 25 | + | | `path` | Path to the installed binary | | |||
| 26 | + | ||||
| 27 | + | ## Logic | |||
| 28 | + | ||||
| 29 | + | 1. Determine runner OS and arch (`linux`/`darwin`, `amd64`/`arm64`) | |||
| 30 | + | 2. If `version=latest`, resolve the tag via GitHub API redirect | |||
| 31 | + | 3. Download `gordon_{os}_{arch}` from GitHub Releases | |||
| 32 | + | 4. Place binary at `/usr/local/bin/gordon`, `chmod +x` | |||
| 33 | + | 5. Verify with `gordon version` | |||
| 34 | + | ||||
| 35 | + | ## Usage | |||
| 36 | + | ||||
| 37 | + | ```yaml | |||
| 38 | + | steps: | |||
| 39 | + | - uses: bnema/gordon/.github/actions/setup-gordon@main | |||
| 40 | + | with: | |||
| 41 | + | version: latest | |||
| 42 | + | ||||
| 43 | + | - run: gordon push --build --remote "$GORDON_REMOTE" --no-confirm | |||
| 44 | + | env: | |||
| 45 | + | GORDON_TOKEN: ${{ secrets.GORDON_TOKEN }} | |||
| 46 | + | GORDON_REMOTE: ${{ secrets.GORDON_REMOTE }} | |||
| 47 | + | ``` | |||
| 48 | + | ||||
| 49 | + | ## Documentation updates | |||
| 50 | + | ||||
| 51 | + | - Update `docs/deployment/github-actions.md` to document `setup-gordon` as the recommended approach | |||
| 52 | + | ||||
| 53 | + | ## Out of scope | |||
| 54 | + | ||||
| 55 | + | - No Docker login/setup (Gordon handles its own auth) | |||
| 56 | + | - No command execution | |||
| 57 | + | - No Windows support (Gordon does not build for Windows) | |||
| 58 | + | - The existing `.github/actions/deploy/` action remains untouched | |||