Skip to main content
By the end of this guide, a GitHub Actions job starts a Reliant workflow, streams its progress into the job log, and passes or fails with the run. The workflow can be an agent that investigates a failed build or a plain check; this guide uses a check that needs no model. The runner only starts and watches the run. The workflow itself runs on one of your machines, against a project checked out there, so it has that machine’s tools and files rather than the runner’s.

Before you begin

  • The reliant CLI on your own computer, signed in (Sign in and tokens).
  • A machine that is online and holds the project the workflow belongs to. Runs go to the project’s machine, by default your default machine.
  • Admin access to the GitHub repository, to add a secret, a variable and a workflow.
1

Add the workflow to the project

On the machine, add a workflow to the project’s .reliant/workflows/. This one fetches a URL and ends the run as a failure unless the fetch succeeds:
.reliant/workflows/smoke-check.yaml
Check it, and print the project’s ID. project create is idempotent, so on an existing project it only prints the ID:
terminal
terminal
2

Try it from your terminal

terminal
terminal
--follow prints the run’s IDs, then one JSON event per line until the run ends, and exits with its result. The run is listed under Runs in the app.A run that reports the workflow is not synced yet has started before the machine picked up the new file. Wait a few seconds and run it again.
3

Create an API token and store it

On your own computer, mint an API token and pipe it straight into the repository secret, so it is never shown. Save the project’s ID as a variable:
terminal
You approve it in the browser, or with a device code (--device). The token acts as you, lasts 90 days, and covers the whole API (reliant:api). reliant workflow run needs that scope: a token narrowed with --scope runs:start is refused with this credential lacks the reliant:api scope.
4

Add the Actions workflow

.github/workflows/smoke-check.yml
The job builds the CLI with go install, pinned to the version you run locally (reliant version). The first build takes about seven minutes; the cache saves the binary when the job succeeds, so later runs skip it. From v1.24.0 you can download the release’s prebuilt CLI archive instead of building it; see CLI only.--hook runs a command for each step that fails, here an error annotation. It hooks node_failed because a run that ends at an outcome: failure node finishes as workflow_completed with "outcome":"failure", so workflow_failed does not fire for it.
5

Run it and read the result

Start it from the Actions tab, or with gh workflow run smoke-check.yml -f url=https://your-site.example/.The step’s log shows the run starting on your machine and each step’s result:
smoke job
The step exits 0 and the job passes. The run took four seconds; the job’s first run spent eight minutes, almost all of it building the CLI.
6

See a failing run fail the job

Run it again with a URL that does not exist. curl exits 22, the hook writes an annotation, the run ends at down, which declares outcome: failure, and --follow exits 1:
smoke job
The error appears as an annotation on the job’s summary page, with the run’s ID to open it under Runs.
7

Revoke the token when you are done

The token is stored under the name reliant-cli@github-actions, and revoke takes that full name or the ID from reliant auth token list:
terminal

Exit codes the job sees

reliant workflow run --follow exits with the run’s result, so the step needs no parsing: A workflow that asks a person something waits for an answer in the Inbox. For a job that should stop there instead, add --exit-on-gate, or use reliant workflow wait-for-gate <execution-id>, which exits 3 with the open gate. Scripting and CI has every command’s codes.

What this does not do

  • The runner does not run the workflow. It runs on the project’s machine, from the workflow file in that checkout. A workflow file changed in the pull request is not what runs until the machine’s checkout has it.
  • In an organization, runs started with a token spend only the organization’s AI accounts. A workflow with an agent step needs an organization AI account that can run its model; a run-only workflow like this one needs none.
  • No short-lived or narrow credential. There is no OIDC login from GitHub Actions to Reliant. The token lasts 90 days and can do anything you can through the API, so keep it to repositories you trust, and revoke it when you rotate it.
  • Actions is optional for GitHub events. A workflow can declare its own GitHub trigger and post its own check run (A GitHub check).

Troubleshooting

The token in RELIANT_TOKEN was created with --scope. reliant workflow run needs the whole API: create the token again without --scope, under the same --name to replace it.
The job has no RELIANT_TOKEN. Check the secret’s name and that the job’s env: passes it. Workflows run from forks get no secrets.
The run started with an empty input. Reliant refuses to run a shell command with an empty value in it. Check that the variable or input you pass to --input is set.

Next steps

Deploy from GitHub Actions

Deploy to Reliant hosting from the same pipeline.

Preview every pull request

Give each pull request its own hosted copy from Actions.

Scripting and CI

Tokens, JSON output, exit codes and event hooks.

Test workflows with scenarios

Check a workflow’s paths on every pull request without running it.