Skip to content

ci: cut Actions usage and move local checks to hk hooks - #24

Merged
TudorAndrei merged 7 commits into
mainfrom
chore/audit-actions-usage
Dec 1, 2026
Merged

TudorAndrei merged 7 commits into
mainfrom
chore/audit-actions-usage

Conversation

@TudorAndrei

@TudorAndrei TudorAndrei commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Why

Every pull request push built release binaries on three runners (macOS included), twice per runner and with no cache, so Actions usage was high. Checks such as Conventional Commits also belong on the developer's machine.

What changes

Before After
Release workflow on a PR push 3-target matrix, cargo build + cargo install compile, no cache One x86_64 Linux build with Swatinem/rust-cache, --help check
Release workflow on workflow_dispatch 3-target matrix Same 3-target matrix; cargo install reuses the build (--target-dir target)
Superseded PR runs (release, docs) Queue Cancelled by a newer push; releases and deploys never cancelled
Job timeouts None 10–45 minutes per job
Conventional Commits CI commits job (cog check) hk commit-msg hook (cog verify)
Local hooks None hk.pkl: gitleaks, private keys, merge markers, large files, typos, jactionlint, cargo fmt, whitespace and final newlines on commit; Clippy (-D warnings) on push
  • mise install installs the pinned tools and the hooks (postinstall).
  • .github/jactionlint.yaml accepts two findings with reasons: the global npm install in the docs build and the Homebrew tap deploy key.
  • Left out on purpose: rumdl, ruff, shellcheck, tombi, hadolint, and mix format. They report many existing findings today.

Look at: .github/workflows/release.yml. PRs now build one target only, so a macOS or arm64 build break shows up at release time.

Evidence

  • hk check --all: all steps pass.
  • jactionlint 2.6.0 on both workflows: no findings.
  • cargo clippy --workspace --all-targets -- -D warnings: passes.
  • cog verify rejects bad message and accepts a valid message. The hooks ran on every commit of this branch.
  • The workflows have not run on GitHub before this PR.

Merge danger

Door: two-way
Blast radius: CI

Commits made outside a machine with hk installed (web UI, bots) no longer get a commit-message check before merge. A bad one makes cog bump fail at release time.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Pull requests now build only the x86_64 Linux binary with a Cargo cache.
The three-target matrix and the install and packaging checks run only for
a release. The cargo install check reuses the release build, and a new
push to a pull request cancels the older run.
Pull request builds no longer share the pages concurrency group with
deploys, and a new push cancels the older run.
Each job now has a timeout, so a hung job cannot use runner minutes
without limit. .github/jactionlint.yaml accepts the global npm install in
the docs build and the Homebrew tap deploy key, with the reasons.
hk.pkl runs gitleaks, typos, jactionlint, cargo fmt and whitespace checks
before each commit, adds Clippy before each push, and checks commit
messages with Cocogitto. mise install installs the tools and the hooks.
The hk commit-msg hook now runs the same Cocogitto check before each
commit.
@TudorAndrei
TudorAndrei merged commit 2acd678 into main Dec 1, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant