Skip to main content
Your GitHub Actions pipeline runs on Aspect Workflows CI runners by targeting a runner group with runs-on:. Your existing bazel steps keep working unchanged: the setup step wires the runner’s remote cache, build event service and NVMe-backed output base into every invocation.
Registering the runners with GitHub Actions is covered in .

Configure GitHub Actions for Aspect Workflows

Create or update your workflow file (for example, .github/workflows/aspect-workflows.yaml). Point each job’s runs-on: at your Workflows runner labels and keep your existing bazel steps. Every job uses the aspect-build/setup-aspect action before its first bazel call. The setup step covers what it does and the inputs it takes.
.github/workflows/aspect-workflows.yaml
Pin to a full-length SHA per GitHub’s third-party action security guidance. Find the latest SHA and version on the setup-aspect releases page.

Non-Bazel jobs

Jobs that don’t call Bazel need no setup step. Target the runner group and run your commands:
.github/workflows/aspect-workflows.yaml

Aspect CLI tasks (optional)

Swap a bazel step for the matching aspect <task> from the open-source Aspect CLI to add status checks, inline PR comments with one-click suggested fixes, retries on transient Bazel errors and selective delivery. To use it, pass your ASPECT_API_TOKEN to setup-aspect and call aspect <task>. The action exchanges the token for a short-lived JWT and persists only the JWT, so the long-lived token isn’t written to GITHUB_ENV or visible to other steps. id-token: write is for artifact uploads and PR summary comments. Status checks and PR comments post as the Aspect Workflows GitHub App, so the job token itself needs only read access:
.github/workflows/aspect-workflows.yaml
The delivery job runs only on pushes to main. --query selects the targets to deliver; without it or positional targets, aspect delivery delivers nothing. You can set the query once in .aspect/config.axl instead (ctx.tasks["delivery"].args.query). See aspect delivery. See Running tasks in CI for the full task reference.
See Aspect Bazel Examples for a complete working example of a GitHub Actions workflow.

GITHUB_TOKEN fallback (optional)

format, lint, and gazelle read a pull request’s changed files from git. When git can’t resolve them, the Aspect CLI asks GitHub’s pull request files API, using the Aspect Workflows GitHub App’s token. If the App isn’t installed on the repository, expose the job’s GITHUB_TOKEN with pull-requests: read so that call can use it instead:
A task that resolves no changed files at all runs across the whole repository, as with --scope=all.