Shared CI, security and accessibility checks for all my repos.
Every repo of mine calls one workflow here. It runs the checks that fit the repo's stack and reports a
single required check, ward / gate, so a red check always blocks a merge.
GitHub Actions reusable workflows, Node 26 scripts with no dependencies, node:test, Biome.
From a repo, run the ward skill in loadout ("apply ward"), which clones this repo at v1 and runs
tools/apply.mjs: it detects the stacks, writes the caller, the Dependabot config
and Directory.Build.props, adds missing npm scripts, and then applies the settings, the ruleset and
auto-merge, each change shown before it is made (docs). By hand, copy
templates/ward.yml to .github/workflows/ward.yml and set the inputs:
jobs:
ward:
uses: malinfossum/ward/.github/workflows/ci.yml@v1
with:
node: "."
dotnet: ""| Module | Runs | Input |
|---|---|---|
| identity | Every commit is mine or Dependabot's and carries no AI attribution | always on |
| node | lint, typecheck, test, build, deploy:check, test:e2e, test:a11y from package.json |
node, a11y |
| dotnet | Restore (a repo's tool manifest first), build with warnings as errors, dotnet format, test (a test project is required), EF Core pending-model check with paths from the repo root |
dotnet (folder or solution file), dotnet-ef-project |
| powershell | Pester 5 under PowerShell 7 on windows-latest; any failed test, block or test file fails it, and so does a path with no *.Tests.ps1 |
powershell (tests folder or one test file) |
The baseline also covers Dependabot with auto-merge for patch and minor updates, majors of
development dependencies and Ward bumps to a release tag (GitHub's own actions only; third-party
actions and runtime-bound .NET packages wait for review), secret scanning with push protection, CodeQL on every
pull request (forks included) through the caller's codeql job, a ruleset on main, and merged
branches deleted on their own. The full
standard is in the design spec.
Two more checks live outside ci.yml. repo-hygiene.yml is a
reusable workflow that checks a repo's public face against its README (docs).
repo-audit.yml sweeps every repo I own each Monday: baseline
settings, caller on @v1, caller inputs against the repo's stacks, dated NuGet audit suppressions,
runtimes near end of life, and the canary (docs).
canary.yml runs the published @v1 every Monday and after every release,
as a consumer would, and watches that the audit keeps running.
npm install
npm test # unit tests, offline
npm run test:fixtures # scripts against good and broken fixtures (needs the .NET 10 SDK and pwsh 7)
npm run test:pins # template pins sit on release tags (run git fetch --tags first)
npm run lintThe caller template pins Ward's codeql and automerge jobs to the commit of a vX.Y.Z tag,
never to the last commit that touched a file: on any other commit Dependabot tracks main instead
of moving from tag to tag. A release PR cannot name its own merge commit, so it leaves the pins on
the previous release, and the next change to the template moves them up. apply.mjs pins a new
caller to the release it runs from either way. npm run test:pins checks the pins against the
tags in the checkout, so it makes no network call. The fixtures job runs it on a checkout with every
tag from GitHub, and a tag missing locally fails the check rather than passing it.
| Path | What |
|---|---|
.github/workflows/ |
ci.yml (entry point), codeql.yml, dependabot-automerge.yml, repo-hygiene.yml, the weekly repo-audit.yml and canary.yml, Ward's own ward.yml |
stacks.json |
Which files mean which module, and the dated exceptions for modules a repo keeps off on purpose; read by the audit and by the ward skill |
docs/ |
The spec, the plans, repo-hygiene.md and repo-audit.md |
tools/ |
The scripts each job runs, watchdog.mjs, apply.mjs (puts a repo on the standard, docs), and their unit tests |
templates/ |
What a repo copies: caller, Dependabot config, rulesets, Directory.Build.props |
fixtures/, tests/ |
Known-good and known-broken projects (the C# ones are xUnit, the PowerShell ones Pester) and the tests that run them |