docs: update GitHub Actions guide to use setup-gordon action
- commit
- fe83be2fa86ea5f4b6167e955636e833f7842496
- author
- brice · · 2026-03-19 04:27 UTC
- parent
- 5b7cfea
- signature
- unsigned
1 file · +25 -22
M docs/deployment/github-actions.md +25 -22
| @@ -34,15 +34,15 @@ In your repository: Settings → Secrets → Actions → New repository secret | |||
| 34 | 34 | | `GORDON_TOKEN` | The generated token | | |
| 35 | 35 | | `GORDON_REMOTE` | `https://gordon.example.com` | | |
| 36 | 36 | ||
| 37 | - | ### 3. Install Gordon Binary | |
| 37 | + | ### 3. Setup Gordon CLI | |
| 38 | 38 | ||
| 39 | - | Add this step to your workflow to download the Gordon binary: | |
| 39 | + | Add this step to your workflow to install the Gordon binary: | |
| 40 | 40 | ||
| 41 | 41 | ```yaml | |
| 42 | - | - name: Install Gordon | |
| 43 | - | run: | | |
| 44 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | |
| 45 | - | chmod +x /usr/local/bin/gordon | |
| 42 | + | - name: Setup Gordon | |
| 43 | + | uses: bnema/gordon/.github/actions/setup-gordon@main | |
| 44 | + | # with: | |
| 45 | + | # version: latest # default, or pin to e.g. v2.0.0 | |
| 46 | 46 | ``` | |
| 47 | 47 | ||
| 48 | 48 | ### 4. Workflow Examples | |
| @@ -64,10 +64,8 @@ jobs: | |||
| 64 | 64 | steps: | |
| 65 | 65 | - uses: actions/checkout@v4 | |
| 66 | 66 | ||
| 67 | - | - name: Install Gordon | |
| 68 | - | run: | | |
| 69 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | |
| 70 | - | chmod +x /usr/local/bin/gordon | |
| 67 | + | - name: Setup Gordon | |
| 68 | + | uses: bnema/gordon/.github/actions/setup-gordon@main | |
| 71 | 69 | ||
| 72 | 70 | - name: Build and Deploy | |
| 73 | 71 | env: | |
| @@ -98,10 +96,8 @@ jobs: | |||
| 98 | 96 | with: | |
| 99 | 97 | fetch-depth: 0 | |
| 100 | 98 | ||
| 101 | - | - name: Install Gordon | |
| 102 | - | run: | | |
| 103 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | |
| 104 | - | chmod +x /usr/local/bin/gordon | |
| 99 | + | - name: Setup Gordon | |
| 100 | + | uses: bnema/gordon/.github/actions/setup-gordon@main | |
| 105 | 101 | ||
| 106 | 102 | - name: Build and Deploy | |
| 107 | 103 | env: | |
| @@ -136,10 +132,8 @@ jobs: | |||
| 136 | 132 | ref: ${{ github.event.inputs.tag || github.ref }} | |
| 137 | 133 | fetch-depth: 0 | |
| 138 | 134 | ||
| 139 | - | - name: Install Gordon | |
| 140 | - | run: | | |
| 141 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | |
| 142 | - | chmod +x /usr/local/bin/gordon | |
| 135 | + | - name: Setup Gordon | |
| 136 | + | uses: bnema/gordon/.github/actions/setup-gordon@main | |
| 143 | 137 | ||
| 144 | 138 | - name: Build and Deploy | |
| 145 | 139 | env: | |
| @@ -168,10 +162,8 @@ jobs: | |||
| 168 | 162 | steps: | |
| 169 | 163 | - uses: actions/checkout@v4 | |
| 170 | 164 | ||
| 171 | - | - name: Install Gordon | |
| 172 | - | run: | | |
| 173 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | |
| 174 | - | chmod +x /usr/local/bin/gordon | |
| 165 | + | - name: Setup Gordon | |
| 166 | + | uses: bnema/gordon/.github/actions/setup-gordon@main | |
| 175 | 167 | ||
| 176 | 168 | - name: Deploy API | |
| 177 | 169 | env: | |
| @@ -211,6 +203,17 @@ Pass build arguments to the Docker build: | |||
| 211 | 203 | --no-confirm | |
| 212 | 204 | ``` | |
| 213 | 205 | ||
| 206 | + | ### setup-gordon Action Reference | |
| 207 | + | ||
| 208 | + | | Input | Required | Default | Description | | |
| 209 | + | |-------|----------|---------|-------------| | |
| 210 | + | | `version` | No | `latest` | Gordon version to install (`v2.0.0` or `latest`) | | |
| 211 | + | ||
| 212 | + | | Output | Description | | |
| 213 | + | |--------|-------------| | |
| 214 | + | | `version` | The version actually installed | | |
| 215 | + | | `path` | Path to the installed binary | | |
| 216 | + | ||
| 214 | 217 | ## Alternative: Docker-based Workflow | |
| 215 | 218 | ||
| 216 | 219 | For environments where installing the Gordon binary is not desired, use Docker directly to build and push to the Gordon registry. Gordon auto-deploys when it receives the image — no explicit deploy step is needed. | |
| @@ -34,15 +34,15 @@ In your repository: Settings → Secrets → Actions → New repository secret | |||||
| 34 | | `GORDON_TOKEN` | The generated token | | 34 | | `GORDON_TOKEN` | The generated token | | ||
| 35 | | `GORDON_REMOTE` | `https://gordon.example.com` | | 35 | | `GORDON_REMOTE` | `https://gordon.example.com` | | ||
| 36 | 36 | ||||
| 37 | - | ### 3. Install Gordon Binary | 37 | + | ### 3. Setup Gordon CLI |
| 38 | 38 | ||||
| 39 | - | Add this step to your workflow to download the Gordon binary: | 39 | + | Add this step to your workflow to install the Gordon binary: |
| 40 | 40 | ||||
| 41 | ```yaml | 41 | ```yaml | ||
| 42 | - | - name: Install Gordon | 42 | + | - name: Setup Gordon |
| 43 | - | run: | | 43 | + | uses: bnema/gordon/.github/actions/setup-gordon@main |
| 44 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | 44 | + | # with: |
| 45 | - | chmod +x /usr/local/bin/gordon | 45 | + | # version: latest # default, or pin to e.g. v2.0.0 |
| 46 | ``` | 46 | ``` | ||
| 47 | 47 | ||||
| 48 | ### 4. Workflow Examples | 48 | ### 4. Workflow Examples | ||
| @@ -64,10 +64,8 @@ jobs: | |||||
| 64 | steps: | 64 | steps: | ||
| 65 | - uses: actions/checkout@v4 | 65 | - uses: actions/checkout@v4 | ||
| 66 | 66 | ||||
| 67 | - | - name: Install Gordon | 67 | + | - name: Setup Gordon |
| 68 | - | run: | | 68 | + | uses: bnema/gordon/.github/actions/setup-gordon@main |
| 69 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | |||
| 70 | - | chmod +x /usr/local/bin/gordon | |||
| 71 | 69 | ||||
| 72 | - name: Build and Deploy | 70 | - name: Build and Deploy | ||
| 73 | env: | 71 | env: | ||
| @@ -98,10 +96,8 @@ jobs: | |||||
| 98 | with: | 96 | with: | ||
| 99 | fetch-depth: 0 | 97 | fetch-depth: 0 | ||
| 100 | 98 | ||||
| 101 | - | - name: Install Gordon | 99 | + | - name: Setup Gordon |
| 102 | - | run: | | 100 | + | uses: bnema/gordon/.github/actions/setup-gordon@main |
| 103 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | |||
| 104 | - | chmod +x /usr/local/bin/gordon | |||
| 105 | 101 | ||||
| 106 | - name: Build and Deploy | 102 | - name: Build and Deploy | ||
| 107 | env: | 103 | env: | ||
| @@ -136,10 +132,8 @@ jobs: | |||||
| 136 | ref: ${{ github.event.inputs.tag || github.ref }} | 132 | ref: ${{ github.event.inputs.tag || github.ref }} | ||
| 137 | fetch-depth: 0 | 133 | fetch-depth: 0 | ||
| 138 | 134 | ||||
| 139 | - | - name: Install Gordon | 135 | + | - name: Setup Gordon |
| 140 | - | run: | | 136 | + | uses: bnema/gordon/.github/actions/setup-gordon@main |
| 141 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | |||
| 142 | - | chmod +x /usr/local/bin/gordon | |||
| 143 | 137 | ||||
| 144 | - name: Build and Deploy | 138 | - name: Build and Deploy | ||
| 145 | env: | 139 | env: | ||
| @@ -168,10 +162,8 @@ jobs: | |||||
| 168 | steps: | 162 | steps: | ||
| 169 | - uses: actions/checkout@v4 | 163 | - uses: actions/checkout@v4 | ||
| 170 | 164 | ||||
| 171 | - | - name: Install Gordon | 165 | + | - name: Setup Gordon |
| 172 | - | run: | | 166 | + | uses: bnema/gordon/.github/actions/setup-gordon@main |
| 173 | - | curl -fsSL https://github.com/bnema/gordon/releases/latest/download/gordon_linux_amd64 -o /usr/local/bin/gordon | |||
| 174 | - | chmod +x /usr/local/bin/gordon | |||
| 175 | 167 | ||||
| 176 | - name: Deploy API | 168 | - name: Deploy API | ||
| 177 | env: | 169 | env: | ||
| @@ -211,6 +203,17 @@ Pass build arguments to the Docker build: | |||||
| 211 | --no-confirm | 203 | --no-confirm | ||
| 212 | ``` | 204 | ``` | ||
| 213 | 205 | ||||
| 206 | + | ### setup-gordon Action Reference | |||
| 207 | + | ||||
| 208 | + | | Input | Required | Default | Description | | |||
| 209 | + | |-------|----------|---------|-------------| | |||
| 210 | + | | `version` | No | `latest` | Gordon version to install (`v2.0.0` or `latest`) | | |||
| 211 | + | ||||
| 212 | + | | Output | Description | | |||
| 213 | + | |--------|-------------| | |||
| 214 | + | | `version` | The version actually installed | | |||
| 215 | + | | `path` | Path to the installed binary | | |||
| 216 | + | ||||
| 214 | ## Alternative: Docker-based Workflow | 217 | ## Alternative: Docker-based Workflow | ||
| 215 | 218 | ||||
| 216 | For environments where installing the Gordon binary is not desired, use Docker directly to build and push to the Gordon registry. Gordon auto-deploys when it receives the image — no explicit deploy step is needed. | 219 | For environments where installing the Gordon binary is not desired, use Docker directly to build and push to the Gordon registry. Gordon auto-deploys when it receives the image — no explicit deploy step is needed. | ||