GitHub Actions

Publish ElasticClaw workspaces and workflows from GitHub Actions using the elasticclaw CLI.

The ElasticClaw source currently ships CLI commands for publishing workspaces and workflows. It does not ship separate first-party GitHub Actions in this repository; use the CLI in your workflow.

Directory structure

Your repository should keep local definitions under .elasticclaw/:

text
.elasticclaw/
  workspaces/
    my-workspace/
      elasticclaw-config.yaml
      AGENTS.md
      TOOLS.md
  workflows/
    triage.yaml
    resolution.yaml

Required secrets

Store the ElasticClaw Server URL and user token as repository secrets:

text
ELASTICCLAW_HUB_URL   # e.g. https://server.example.com
ELASTICCLAW_TOKEN     # server user token

Publish workflow

yaml
name: Publish ElasticClaw config

on:
  push:
    branches: [main]
    paths:
      - ".elasticclaw/**"
  workflow_dispatch:

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install elasticclaw
        env:
          ELASTICCLAW_VERSION: "2026.5.20"
        run: |
          set -euo pipefail
          base="https://github.com/elasticclaw/elasticclaw/releases/download/$ELASTICCLAW_VERSION"
          curl -fsSLO "$base/elasticclaw-linux-amd64"
          curl -fsSLO "$base/checksums.txt"
          grep " elasticclaw-linux-amd64$" checksums.txt | sha256sum -c -
          chmod +x elasticclaw-linux-amd64
          sudo mv elasticclaw-linux-amd64 /usr/local/bin/elasticclaw

      - name: Login
        run: elasticclaw login --hub "$ELASTICCLAW_HUB_URL" --token "$ELASTICCLAW_TOKEN"
        env:
          ELASTICCLAW_HUB_URL: ${{ secrets.ELASTICCLAW_HUB_URL }}
          ELASTICCLAW_TOKEN: ${{ secrets.ELASTICCLAW_TOKEN }}

      - name: Push workspaces
        run: |
          for dir in .elasticclaw/workspaces/*; do
            [ -d "$dir" ] || continue
            elasticclaw workspace push "$(basename "$dir")"
          done

      - name: Push workflows
        run: |
          elasticclaw workflow push --workspace my-workspace .elasticclaw/workflows

Commands used

elasticclaw workspace push <name> — Publishes one local workspace from .elasticclaw/workspaces/.

elasticclaw workflow push --workspace <name> <file-or-dir> — Publishes workflow YAML into that workspace.

Pin ELASTICCLAW_VERSION to a release you have reviewed. The workflow verifies the downloaded binary against the release'schecksums.txt before installing it on the runner.