mirror of
https://github.com/systeminit/setup-swamp.git
synced 2026-05-20 16:25:16 +00:00
No description
Add newline checks on api-key and swamp-club-url inputs to prevent environment variable injection via GITHUB_ENV. Also enforce https:// scheme on swamp-club-url to prevent credentials being sent over plaintext or to non-HTTP destinations. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .github/workflows | ||
| action.yml | ||
| COPYING | ||
| COPYING-EXCEPTION | ||
| LICENSE | ||
| README.md | ||
setup-swamp
A GitHub Action to install swamp and optionally authenticate with swamp.club.
Usage
- uses: systeminit/setup-swamp@v1
with:
api-key: ${{ secrets.SWAMP_API_KEY }}
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
version |
No | stable |
Swamp version to install |
api-key |
No | API key for authenticating with swamp.club | |
swamp-club-url |
No | Override the swamp.club server URL | |
repo-init |
No | false |
Run swamp repo init after setup |
Outputs
| Output | Description |
|---|---|
version |
The version of swamp that was installed |
Examples
Install stable and authenticate:
steps:
- uses: actions/checkout@v4
- uses: systeminit/setup-swamp@v1
with:
api-key: ${{ secrets.SWAMP_API_KEY }}
- run: swamp model list
Install a specific version:
steps:
- uses: actions/checkout@v4
- uses: systeminit/setup-swamp@v1
with:
version: 20250218.210911.0-sha.bda1ce6ea
Install, authenticate, and initialize the repo:
steps:
- uses: actions/checkout@v4
- uses: systeminit/setup-swamp@v1
with:
api-key: ${{ secrets.SWAMP_API_KEY }}
repo-init: true
- run: swamp workflow run my-workflow
How it works
- Installs swamp using the official install script from
artifacts.systeminit.com/install.sh - Adds swamp to
PATH - If
api-keyis provided, masks the value in logs and setsSWAMP_API_KEYas an environment variable for all subsequent steps, then verifies authentication withswamp auth whoami - If
swamp-club-urlis provided, setsSWAMP_CLUB_URLas an environment variable for all subsequent steps - If
repo-initistrue, runsswamp repo init
Supported platforms
- Linux (x86_64, aarch64)
- macOS (x86_64, aarch64)
License
AGPLv3 - see LICENSE for details.