GitHub Action
The Action runs one released gantry binary in a GitHub Actions job:
- uses: actions/checkout@v7- uses: c65llc/gantry@v0 with: version: v0.9.2 args: lint --strictIt works on Linux, macOS and Windows runners, on x64 and arm64.
Inputs
Section titled “Inputs”| Input | Required | Default | Value |
|---|---|---|---|
version |
yes | none | The exact Gantry release to run, as vX.Y.Z, such as v0.1.0. |
args |
no | lint |
The arguments for gantry, on one line, such as lint --strict, sweep or generate --check. |
working-directory |
no | . |
The directory to run gantry in. |
The Action has one output, path: the path of the verified gantry binary.
Read it as steps.<id>.outputs.path to run gantry yourself in a later step.
args is split on whitespace and nothing else: there is no shell, so no
quoting, globbing or variable expansion, and no argument can contain a
space. A value with more than one line is an error.
What it does
Section titled “What it does”- Checks that
versionis an exact release,vX.Y.Z, before it downloads anything. - Downloads that release’s archive for the runner’s operating system and
architecture, and its
checksums.txt, from the repository’s releases. - Checks the archive’s SHA-256 against
checksums.txt, and stops if it does not match. - Extracts the binary and runs it as
gantry <args>inworking-directory. The job fails ifgantryexits with a status other than 0.
If args contains --format github, the output is also appended to the
job’s step summary ($GITHUB_STEP_SUMMARY), so the tally of what each rule
examined is on the run’s page as well as in the annotations. The exit status
is still gantry’s.
The Action’s own tag, @v0, moves to each new 0.x release, and @v1 will do
the same from 1.0. The binary it runs changes only when you change version,
so a new Gantry release never changes your CI’s result until you choose it.
Examples
Section titled “Examples”The recommended pull-request job. --base needs the base branch’s history, so
check out with fetch-depth: 0 (the files are not LFS-backed for lint, so
no LFS download is needed):
- uses: actions/checkout@v7 with: { fetch-depth: 0 }- uses: c65llc/gantry@v0 with: { version: v0.9.2, args: "lint --format github --base origin/${{ github.base_ref }}" }Without --base, the history rules are listed in the tally as skipped. With
--base and a ref that cannot be resolved, lint fails with
base-unavailable, which almost always means a shallow checkout.
Run the project’s gates:
- uses: c65llc/gantry@v0 with: version: v0.9.2 args: sweep --format githubA project in a subdirectory of the repository, design/:
- uses: c65llc/gantry@v0 with: version: v0.9.2 args: --dir design lintworking-directory: design with args: lint does the same.
Only check that the generated pages are current:
- uses: c65llc/gantry@v0 with: version: v0.9.2 args: generate --check