require-github-actions-workflow-file
Require at least one GitHub Actions workflow file.
Targeted pattern scopeâ
This rule checks .github/workflows/ for at least one workflow file with an
accepted extension:
.yml.yaml
What this rule reportsâ
This rule reports repositories that enable GitHub-oriented presets without any
workflow files under .github/workflows/.
Why this rule existsâ
If a repository adopts GitHub-focused policy checks but has no workflows at all, that usually means intended automation was never actually declared.
This rule enforces the minimum expectation that GitHub CI or governance has a workflow entry point.
â Incorrectâ
// Repository files
// .
// âââ .github/
// â âââ dependabot.yml
// âââ README.md
// âââ package.json
//
// Missing: .github/workflows/*.yml or *.yaml
â Correctâ
// Repository files
// .
// âââ .github/
// âââ workflows/
// âââ ci.yml
ESLint flat config exampleâ
import repoPlugin from "eslint-plugin-repo";
export default [
repoPlugin.configs.github,
{
plugins: { "repo-compliance": repoPlugin },
rules: {
"repo-compliance/require-github-actions-workflow-file": "error",
},
},
];
When not to use itâ
Disable this rule only if the repository is hosted on GitHub but deliberately does not use GitHub Actions for any automation.
Rule catalog ID: R011