6
0
Fork 0
mirror of https://github.com/systeminit/setup-swamp.git synced 2026-05-20 16:25:16 +00:00
No description
Find a file
Paul Stack f2f0ff9f34
fix: validate inputs to prevent GITHUB_ENV injection (#2)
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>
2026-04-03 19:03:50 +01:00
.github/workflows ci: add auth test using SWAMP_API_KEY secret 2026-03-30 21:04:36 +01:00
action.yml fix: validate inputs to prevent GITHUB_ENV injection (#2) 2026-04-03 19:03:50 +01:00
COPYING harden action and add license files 2026-03-30 20:56:26 +01:00
COPYING-EXCEPTION harden action and add license files 2026-03-30 20:56:26 +01:00
LICENSE harden action and add license files 2026-03-30 20:56:26 +01:00
README.md refactor: use official install script instead of gh release download 2026-03-30 20:58:25 +01:00

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

  1. Installs swamp using the official install script from artifacts.systeminit.com/install.sh
  2. Adds swamp to PATH
  3. If api-key is provided, masks the value in logs and sets SWAMP_API_KEY as an environment variable for all subsequent steps, then verifies authentication with swamp auth whoami
  4. If swamp-club-url is provided, sets SWAMP_CLUB_URL as an environment variable for all subsequent steps
  5. If repo-init is true, runs swamp repo init

Supported platforms

  • Linux (x86_64, aarch64)
  • macOS (x86_64, aarch64)

License

AGPLv3 - see LICENSE for details.