Skip to content

Create setup-swamp GitHub Action #912

@stack72

Description

@stack72

Problem Statement

Users who want to use swamp in their CI/CD pipelines (GitHub Actions) currently have no standardized way to install swamp and authenticate with swamp.club. Each user must write their own installation and authentication steps, leading to inconsistency and duplicated effort.

Proposed Solution

Create a setup-swamp GitHub Action that:

  1. Downloads and installs swamp — Downloads the appropriate swamp binary for the runner's platform and adds it to PATH
  2. Optionally authenticates with swamp.club — If the user provides an API token input, the action authenticates the user to swamp.club
  3. Optionally initializes the repo — If repo-init is enabled, runs swamp repo init to set up the repository

Action Inputs

Input Required Description
version No Swamp version to install (default: latest)
api-token No API token for authenticating with swamp.club
repo-init No Run swamp repo init after setup (default: false)

Example Usage

- uses: systeminit/setup-swamp@v1
  with:
    version: latest
    api-token: ${{ secrets.SWAMP_API_TOKEN }}
    repo-init: true

Implementation Summary

This feature would require creating a new GitHub Action repository (or directory within this repo) with:

  • action.yml — Action metadata defining inputs, branding, and the composite/JS entry point
  • Download logic — Fetch the correct swamp binary for the runner OS/arch from GitHub releases
  • PATH setup — Add the downloaded binary to the runner's PATH
  • Authentication step — If api-token is provided, run the appropriate swamp auth command to authenticate with swamp.club
  • Repo init step — If repo-init is true, run swamp repo init to initialize the repository
  • Caching (optional) — Cache the downloaded binary to speed up subsequent runs

The action should support Linux and macOS runners at minimum.

Alternatives Considered

  • Documenting manual installation steps in a wiki — less ergonomic, more error-prone
  • A shell script users curl and pipe — less discoverable, harder to version

Metadata

Metadata

Assignees

Labels

featureFeature request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions