Trigger a task from CI

Fire a Veirox task from a GitHub Actions workflow, attach an idempotency key so retries are deduplicated, and stream the transcript inline.

Prerequisites

  • A Veirox task with a known task-id (UUID).
  • An API key with tasks:trigger scope stored as GitHub secret VEIROX_API_KEY.
  • veirox CLI installed on the runner (see install step below).

Steps

# .github/workflows/nightly.yml
name: Nightly agent run
on:
  schedule: [{ cron: '0 2 * * *' }]

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - name: Install Veirox CLI
        run: curl -fsSL https://veirox.com/cli/install.sh | sh

      - name: Trigger task
        run: |
          veirox task run "$VEIROX_TASK_ID"             --idempotency-key "$GITHUB_RUN_ID"             --wait
        env:
          VEIROX_API_KEY: ${{ secrets.VEIROX_API_KEY }}
          VEIROX_TASK_ID: ${{ vars.VEIROX_TASK_ID }}

Common pitfalls

  • Job timeout: drop --wait and stream in a separate step with timeout-minutes if the task can be long-running.
  • API key scope: ensure the key has tasks:trigger, not just tasks:read.
  • Project ID: set VEIROX_PROJECT_ID if your org has more than one project.

See also