| title | GitHub Action |
|---|---|
| section | Integrations |
| order | 1 |
Run SpecSync in CI with zero setup. Auto-detects OS/arch, downloads the binary, runs validation.
- uses: CorvidLabs/spec-sync@v4
with:
strict: 'true'
require-coverage: '100'| Input | Default | Description |
|---|---|---|
version |
latest |
Release version to download |
strict |
false |
Treat warnings as errors |
require-coverage |
0 |
Minimum file coverage % (0–100) |
root |
. |
Project root directory |
args |
'' |
Extra whitespace-separated CLI arguments passed to specsync check; shell quoting is not supported |
comment |
false |
Post spec drift results as a PR comment. Requires pull_request event and write permissions |
token |
${{ github.token }} |
GitHub token for posting PR comments. Override if using a PAT for cross-repo access |
name: Spec Check
on: [push, pull_request]
jobs:
specsync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: CorvidLabs/spec-sync@v4
with:
strict: 'true'
require-coverage: '100'Post spec drift results directly on pull requests. SpecSync runs diff --format markdown and posts (or updates) a comment showing added/removed exports.
name: Spec Check
on:
pull_request:
types: [opened, synchronize]
jobs:
specsync:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: CorvidLabs/spec-sync@v4
with:
strict: 'true'
comment: 'true'How it works:
- Runs
specsync check --force(always validates all specs — the hash cache is not committed to git) - If
comment: 'true', also runsspecsync diff --format markdown - Posts the markdown output as a PR comment (or updates an existing SpecSync comment)
- Requires
pull-requests: writepermission and thepull_requestevent trigger
Custom token (e.g., for private registries or cross-repo refs):
- uses: CorvidLabs/spec-sync@v4
with:
comment: 'true'
token: ${{ secrets.MY_PAT }}jobs:
specsync:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: CorvidLabs/spec-sync@v4
with:
strict: 'true'- uses: CorvidLabs/spec-sync@v4
with:
root: './packages/backend'
strict: 'true'- name: Install specsync
run: |
curl -sL https://github.com/CorvidLabs/spec-sync/releases/latest/download/specsync-linux-x86_64.tar.gz | tar xz
sudo mv specsync-linux-x86_64 /usr/local/bin/specsync
- name: Spec check
run: specsync check --strict --require-coverage 100| Platform | Binary |
|---|---|
| Linux x86_64 | specsync-linux-x86_64 |
| Linux aarch64 | specsync-linux-aarch64 |
| macOS x86_64 | specsync-macos-x86_64 |
| macOS aarch64 (Apple Silicon) | specsync-macos-aarch64 |
| Windows x86_64 | specsync-windows-x86_64.exe |