Lint Clean + GitHub Actions Collector
Enforce Lint Clean using data collected by GitHub Actions Collector. Automatically check devex build and ci standards on every PR.
How GitHub Actions Collector Powers This Guardrail
The GitHub Actions Collector gathers metadata from your systems. This data flows into Lunar's Component JSON, where the Lint Clean guardrail evaluates it against your standards.
When enabled, this check runs automatically on every PR and in AI coding workflows, providing real-time enforcement with actionable feedback.
Quick Start Configuration
Add both the collector and policy to your lunar-config.yml to enable this guardrail.
# Step 1: Enable the GitHub Actions Collector
collectors:
- uses: github://earthly/lunar-lib/collectors/github-actions@v1.0.5
# with: ...
# Step 2: Enable the CI Guardrails
policies:
- uses: github://earthly/lunar-lib/policies/ci@v1.0.5
include: [lint-clean]
# with: ...
What GitHub Actions Collector Collects
This collector gathers the following data that the Lint Clean guardrail evaluates.
workflows
Parses all GitHub Actions workflow files in .github/workflows/, runs actionlint for lint errors, and classifies action version pinning (SHA, tag, branch, unpinned) for supply-chain hygiene.
Example Data Flow
Here's an example of the data that GitHub Actions Collector writes to the Component JSON, which Lint Clean then evaluates.
{
"ci": {
"lint": {
"source": { "tool": "actionlint", "version": "1.7.7", "integration": "code" },
"errors": [
{
"file": ".github/workflows/ci.yml",
"line": 42,
"column": 9,
"message": "property \"unknown_field\" is not defined",
"rule": "syntax-check"
}
],
"error_count": 1,
"warning_count": 0
},
"dependencies": {
"source": { "tool": "github-actions", "version": "0.1.0", "integration": "code" },
"total": 3,
"pinned": 2,
"unpinned": 1,
"items": [
{ "name": "actions/checkout", "ref": "abc123def456", "pinning": "sha", "party": "1st" },
{ "name": "docker/build-push-action", "ref": "v5.1.0", "pinning": "tag", "party": "3rd" },
{ "name": "docker/login-action", "ref": "main", "pinning": "branch", "party": "3rd" }
],
"third_party_unpinned": ["docker/login-action@main"]
},
"native": {
"github_actions": {
"source": { "tool": "github-actions", "version": "0.1.0", "integration": "code" },
"workflows": [
{
"file": ".github/workflows/ci.yml",
"name": "CI",
"triggers": ["push", "pull_request"],
"jobs": {
"build": {
"steps": [
{ "uses": "actions/checkout@abc123def456", "with": { "persist-credentials": false } },
{ "run": "make build" }
]
},
"test": {
"steps": [
{ "uses": "actions/checkout@abc123def456" },
{ "run": "make test" }
]
}
},
"permissions": { "contents": "read" },
"actions": [
{ "uses": "actions/checkout@abc123def456", "pinning": "sha", "party": "1st" },
{ "uses": "docker/build-push-action@v5.1.0", "pinning": "tag", "party": "3rd" },
{ "uses": "docker/login-action@main", "pinning": "branch", "party": "3rd" }
]
}
]
}
}
}
}
Ready to Automate Your Standards?
See how Lunar can turn your AGENTS.md, engineering wiki, compliance docs, or postmortem action items into automated guardrails with our 100+ built-in guardrails.