Skip to content

Repository files navigation

Workflows

Reusable GitHub Actions workflows for QuantX repositories.

The public contract is only .github/workflows/*.yml with on.workflow_call. The caller owns on: (push, pull_request, tags, schedule). actions/ is private implementation; do not uses: it from other repositories.

Pin CI and ops uses: at @v2. Pin publish, release, and deploy at @v2.0.0.

Hardening in every public workflow:

  • Job-level permissions (union at workflow top-level).
  • Third-party uses: pinned to owner/repo@<40-char-sha> # vX.Y.Z.
  • Same-repository references use $/ with no @ref.
  • actions/checkout via $/actions/hardened-checkout with persist-credentials: false unless the job pushes.
  • Explicit timeout-minutes on every concrete job.
  • CI cancels in-flight runs; publish / release / deploy / ops do not.

Catalogue

See docs/CATALOGUE.md for name:, job ids, and inputs. Permissions: docs/CONSUMERS.md. Cutover: docs/MIGRATION.md. Copy-paste callers: examples/.

CI

WorkflowPurpose
ci-bun.ymlBun install / lint / typecheck / build / test. bun-version default 1.4, not latest.
ci-foundry.ymlForge fmt --check / build --sizes / test -vvv. Profile default ci.
ci-go.ymlgo mod tidy drift check, vet, optional golangci-lint, race tests.
ci-node.ymlMatrix across Node versions. package-manager is npm / pnpm / yarn, not detected.
ci-python.ymluv install, ruff + pytest. pyproject.toml or requirements.txt.
ci-rust.ymlfmt / clippy -D warnings / build / test. Optional apt and deny (cargo-deny).

CI job id is ci. Version inputs are {tool}-version (rust-version, node-version, …). submodules defaults to false. Foundry repos with lib/ as a git submodule must pass submodules: true.

Publish

WorkflowPurpose
publish-npm.ymlnpm / pnpm / yarn / bun. Workspace install at install-directory; publish one package at working-directory.
publish-pypi.ymlEmpty PYPI_TOKEN → OIDC + attestations. Token path never attestations.
publish-crates.ymlcargo publish --locked, skip-if-exists, 429 retry. CARGO_REGISTRY_TOKEN required.
publish-container.ymlDual-arch OCI push, SBOM, provenance. attest default true.

Publish job id is publish. publish-container.yml splits mutually exclusive build (push: false) and publish (push: true) jobs.

Release

WorkflowPurpose
release.ymlTag → GitHub Release with git-cliff. Optional asset glob / artifact download.
release-rust.ymlFive-target binary matrix, then GitHub Release. jobs.build.name is Build ${{ matrix.target }}.

Deploy

WorkflowPurpose
deploy-pages.ymlBun build + actions/deploy-pages. Pull requests run build only.
deploy-mkdocs.ymluv-installed MkDocs via mkdocs gh-deploy --force (pushes gh-pages).

Ops

WorkflowPurpose
ops-stale.ymlactions/stale. workflow_call only; the caller owns schedule.
ops-sync.ymlMirror a folder from another repository. Secret SYNC_TOKEN.
ops-dependabot.ymlEnable auto-merge on Dependabot PRs. No checkout. Does not approve.

This repository only

Do not uses: these from other repositories.

WorkflowPurpose
self-ci.ymlactionlint, zizmor, pinact, format, composite tests.
self-release.ymlAnnotated v*.*.* tags → release.yml.
self-stale.ymlThis repository's stale cron.
self-dependabot.ymlAuto-merge this repository's Dependabot PRs.
self-retag.ymlForce-move v<major> onto an existing immutable tag.

Usage

Pin CI and ops at @v2. Pin publish, release, and deploy at @v2.0.0.

on:
push:
branches: [main]pull_request:
permissions:
contents: readjobs:
ci:
uses: qntx/workflows/.github/workflows/ci-node.yml@v2with:
node-versions: '["22", "24"]'package-manager: npm
on:
push:
branches: [main]pull_request:
permissions:
contents: readjobs:
ci:
uses: qntx/workflows/.github/workflows/ci-foundry.yml@v2with:
submodules: true# foundry-profile defaults to ci; set default if foundry.toml has no [profile.ci].
on:
push:
tags: ['v*.*.*']permissions:
contents: readid-token: writejobs:
publish:
uses: qntx/workflows/.github/workflows/publish-npm.yml@v2.0.0
on:
push:
tags: ['v*.*.*']permissions:
contents: writejobs:
release:
uses: qntx/workflows/.github/workflows/release.yml@v2.0.0
on:
push:
branches: [main]permissions:
contents: readpages: writeid-token: writejobs:
deploy:
uses: qntx/workflows/.github/workflows/deploy-pages.yml@v2.0.0with:
path: dist

Caller job permissions are intersected with the callee. Token-only npm/PyPI does not need id-token. OIDC publish and Pages deploy do. Exact blocks: docs/CONSUMERS.md.

License

This project is licensed under the MIT License.


A QuantX open-source project.

QuantX

Code is law. We write both.

About

Automatically distribute GitHub Actions workflow across repositories.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Contributors

Languages