# Connect GitHub Actions

> Let your agent do it: Add a Hermitbox step to my GitHub Actions workflow. Check that my install has an address the runner can reach; a hosted runner can't reach a loopback install. Have me set the repository Actions variable `HERMITBOX_API_URL` and the secret `HERMITBOX_API_KEY` myself, and set `HERMITBOX_IMAGE` to `alpine:3.22` only for the container tier. Then add the page's step to a job: it runs `echo hello` and deletes its sandbox. Never copy the key into the workflow or this chat. Follow the exact steps in https://docs.hermitbox.dev/v0.3.2/integrations/github-actions.md.

Run a workflow's command in a fresh sandbox on your own Hermitbox, from one step. The Action
creates the sandbox, runs the command and deletes the sandbox.

1. Host Hermitbox at an address your Actions runner can reach. Hosted runners can't reach a
   private loopback install.
2. Set the repository Actions variable `HERMITBOX_API_URL` and the secret `HERMITBOX_API_KEY`. For
   containers, set the variable `HERMITBOX_IMAGE` to `alpine:3.22`; for process or Wasm, leave it
   empty.
3. Put this step in a workflow job. The Action runs `echo hello` and deletes its sandbox.

```yaml
- uses: hermitbox/hermitbox/action@v0.3.2
  with:
    url: ${{ vars.HERMITBOX_API_URL }}
    key: ${{ secrets.HERMITBOX_API_KEY }}
    image: ${{ vars.HERMITBOX_IMAGE }}
    run: echo hello
```

The Action's tag follows the repository's release version. An image needs the container tier.
With the image empty, the command runs on the host's default tier, and a weaker isolation is never
substituted. See the [Action inputs](https://github.com/hermitbox/hermitbox/blob/cdd62e6c07e07c2b649b726729b4d8da6b25a737/action/action.yml) and
[tier boundaries](https://docs.hermitbox.dev/v0.3.2/reference/tiers.md).
