The repository uses GitHub Actions to validate its configuration, documentation, scripts, and security checks automatically.
The workflow is defined in:
.github/workflows/ci.yml
The workflow runs automatically:
- on pushes to the
mainbranch; - on pull requests;
- when started manually through
workflow_dispatch.
The workflow uses read-only repository permissions:
permissions:
contents: readNo write access is required for repository quality checks.
The workflow contains a quality job running on the latest Ubuntu GitHub-hosted runner.
Its purpose is to reproduce the repository-wide checks normally executed locally through pre-commit.
The workflow installs the tools required by hooks declared with:
language: systemThese tools include:
markdownlint-cli2;lychee;editorconfig-checker;actionlint.
Hooks provided directly by remote pre-commit repositories, including Gitleaks, ShellCheck, and the standard pre-commit hooks, are installed automatically by pre-commit.
The complete repository is validated with:
pre-commit run --all-files --show-diff-on-failureThis keeps local and continuous integration checks aligned around the same configuration:
.pre-commit-config.yaml
The current workflow validates:
- trailing whitespace;
- missing final newlines;
- YAML syntax;
- accidentally added large files;
- unresolved merge conflict markers;
- private keys;
- hardcoded secrets with Gitleaks;
- Markdown formatting;
- documentation links;
- EditorConfig compliance;
- GitHub Actions workflow syntax;
- shell script linting with ShellCheck (
scripts/*.sh,install.sh).
An additional macOS workflow validates platform-specific behavior:
.github/workflows/ci-macos.ymlruns the test suite, checks the setup CLI contract (--dry-run), installs the full Homebrew profile, applies setup once, and runs the verification and hardening checks (scripts/verify.sh).
GitHub Actions caches pre-commit environments under:
~/.cache/pre-commit
The cache key includes the operating system and a hash of:
.pre-commit-config.yaml
Changing the pre-commit configuration therefore creates a new cache automatically.
Validate the workflow structure without executing it:
actionlint .github/workflows/ci.ymlRun the same repository checks locally:
pre-commit run --all-filesRun the quality job locally with Act:
act pull_request \
--job quality \
--container-architecture linux/amd64 \
-P ubuntu-latest=catthehacker/ubuntu:act-latest \
--pull=falseAct provides useful local feedback but does not reproduce GitHub-hosted runners perfectly.
A successful run on GitHub Actions remains the final validation.
List recent workflow executions:
gh run list \
--workflow CI \
--limit 5Inspect the latest failed workflow logs:
gh run view --log-failed- Act local GitHub Actions execution
- Actionlint GitHub Actions workflow validation
- Pre-commit and Gitleaks
