GitHub Actions
Build, sign and deploy a workspace from GitHub Actions, with the provenance attached that fh builds verify later.
A reference workflow that builds the workspace, emits a signed Docker image and pushes to a registry.
name: build-agents
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 10.10.0
- uses: actions/setup-node@v7
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build, sign, push agents image
env:
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
run: |
./packages/cli/dist/bin/fabric-harness.js build \
--target docker \
--docker-build --docker-push \
--docker-tag ghcr.io/${{ github.repository }}/agents:${{ github.sha }} \
--image-sbom --image-sbom-required \
--provenance --sign-provenance --signing-key env://COSIGN_PRIVATE_KEY \
--attestation
- uses: actions/upload-artifact@v7
with:
name: build-manifest
path: |
.fabricharness/build/docker/manifest.json
.fabricharness/build/docker/provenance.json
.fabricharness/build/docker/attestation.intoto.jsonlCI smoke tests
Add a job that runs the agent against the mock model in CI.
smoke:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 10.10.0
- uses: actions/setup-node@v7
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: |
cd examples/issue-triage-ci
../../packages/cli/dist/bin/fabric-harness.js doctor --tools
../../packages/cli/dist/bin/fabric-harness.js run triage \
--model openai/gpt-5.5 \
--mock \
--payload-file fixtures/issue-opened.json--mock is mandatory in this credential-free smoke job. It prevents provider calls, cost, and
nondeterministic model output even though the definition contains a real model identifier. See
examples/issue-triage-ci for repository access to the complete
read-only triage fixture.
Keep Actions on supported runtimes
GitHub-hosted JavaScript actions must use a supported action runtime independently of the Node.js
version your job installs. For example, actions/setup-node itself runs on Node 24 while it can still
install Node 22.19 or a newer Node 22 release for compatibility testing.
Fabric's reviewed baseline is:
| Action | Supported baseline |
|---|---|
actions/checkout | v7 |
actions/setup-node | v7 |
actions/upload-artifact | v7 |
actions/attest | v4 |
pnpm/action-setup | v6 |
Run pnpm check:github-actions before landing workflow or documentation changes. The check rejects
older Node-runtime majors, deprecated attestation wrappers, an outdated reviewed Databricks CLI pin,
the checksum-pinned Gitleaks CLI release used by the supply-chain workflow, and attempts to restore
obsolete runtimes with ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION.
Fabric runs the open-source Gitleaks v8.30.1 CLI directly from its checksum-verified release
archive. The current gitleaks/gitleaks-action requires a commercial license for organization-owned
repositories, so it is not used as a portable default.
The repository also enables weekly Dependabot checks for the github-actions package set. Treat those
PRs as runtime and supply-chain updates. Read the action's official release notes, update the policy
baseline and examples in the same change, run CI, and verify self-hosted runners meet the action's
minimum runner version. The current Node 24 actions require runner 2.327.1 or newer.
Major tags keep official actions on security and patch updates within the reviewed compatibility line. Pin third-party actions to a full commit SHA in secret-bearing or deployment workflows, and keep the human-readable release tag in the comment beside the pin.
Use ${{ github.sha }} or ${{ github.run_id }} in artifact names rather than
${{ github.ref_name }}. Branch ref names can contain /, which current upload-artifact releases
reject in portable artifact names.
Protected live evidence
Keep destructive or credentialed certification in a GitHub Environment with required reviewers and
protected deployment branches. Fabric's hosted-sandbox jobs use sandbox-live; direct DeepSeek,
Moonshot, and xAI smoke tests use model-providers-live. A missing secret may skip an optional smoke,
but it cannot create retained certification evidence.
For hosted sandboxes, run scripts/validate-sandbox-certification.mjs before upload, because an
artifact that reaches a registry without that check is one nobody can later say was certified. The validator
requires credentials, all nine checks, the declared package and SDK target, and the actually
installed package version. It emits a digest manifest and immutable Actions run URL. Retain both the
report and manifest for review.
The full CI lane also runs pnpm test:coverage:authoring and uploads its LCOV/JSON summary.
Do not publish Databricks authoring packages if that gate, docs:impact, docs:check or
docs:build fails, because a published package whose documentation never built is one somebody
will adopt from a page that does not describe it.
Repository CI lanes
In .github/workflows/ci.yml, changes compares the PR base SHA with the workflow
head SHA. The reduced lane is available only when the diff is nonempty and all paths
are under docs/ or apps/docs/, equal to fabric-family.json, root-level Markdown,
or a certification file explicitly listed in scripts/ci-change-scope.mjs.
The compatibility page at apps/docs/content/docs/databricks/compatibility.mdx
stays on the full lane because its native SDK boundary test needs package test
setup beyond Typecheck. Package READMEs also require full CI.
validate-docs builds the docs site, typechecks the workspace, checks documentation
and visual contracts, validates the internal parity ledger, and runs lint. It retains
the Fabric family compatibility check. The lane also runs examples:check, the
React chat build that consumes docs assets, the docs app's Vitest tests, and the
offline certification tests in check:publish-guard; it doesn't run release
packaging. Typechecking emits the package declarations that API reference generation
reads. The classifier defaults to full validation for missing or unreadable evidence;
dispatches also run the full lane.
scripts/ci-scope-contract.test.mjs discovers skipped script entry points from the
workflow and transitive package scripts. It checks static relative JavaScript
imports from entry points under scripts/ against the certification allowlist.
It doesn't follow child-process launches or imports from files outside scripts/.
Its separate coverage check requires script tests named *.test.mjs that reach
allowlisted modules to run in the reduced lane. Workspace script-call checks also
retain the docs app's build, check, and test commands.
The command scanner expands its supported runners and shell wrappers. Unrecognized
command words fail the contract, as do unresolved entries and
unsupported execution forms, including command substitution and YAML indentation
indicators. Shared release helpers such as scripts/lib/pending-changesets.mjs
stay full-lane inputs, as does the RAG fixture read by a skipped package test.
A reduced run skips validate and the side jobs. Its successful workflow conclusion
doesn't qualify as release evidence. The release source guard requires the full job
inventory to succeed, including matrix members, and rejects missing or unreadable
jobs. For a main commit created by a reduced-lane PR, run gh workflow run ci.yml --ref main
and wait for it to pass before publishing. A successful full run on main can come from
a push or dispatch; merged PR evidence must match the published tree.
Maintainer package releases
The repository's release-publish.yml workflow uses npm trusted publishing (OIDC),
with id-token: write and npm 11.21.0 for publish and dist-tag support.
Provenance remains disabled while the source repository is private.
For each public @fabric-harness/* package on npmjs.com, open Settings → Trusted
Publisher → GitHub Actions. Set organization Fabric-Pro, repository fabric-harness,
workflow file release-publish.yml, no environment, and direct publish plus dist-tag
access. Complete the first publish within 2 days; npm expires unused configurations
at that point. After the first successful OIDC release, set Publishing access to
“Require two-factor authentication and disallow tokens” on each package and delete
the repository's NPM_TOKEN secret. See DEPLOY.md for release scope and certification
procedures. Public npm view lookups require no token.