Skip to main content

require-template-workflow-name

Rule catalog ID: R067

Targeted pattern scopeโ€‹

Workflow template YAML files under workflow-templates/.

What this rule reportsโ€‹

Reports missing or empty top-level name fields.

Why this rule existsโ€‹

Template names are primary labels shown in workflow selection UI.

โŒ Incorrectโ€‹

on:
push:

โœ… Correctโ€‹

name: Node.js CI
on:
push:

Additional examplesโ€‹

For larger repositories, this rule is often enabled together with one of the published presets so violations are caught in pull requests before workflow changes are merged.

ESLint flat config exampleโ€‹

import githubActions from "eslint-plugin-github-actions-2";

export default [
{
files: ["**/*.{yml,yaml}"],
plugins: {
"github-actions": githubActions,
},
rules: {
"github-actions/require-template-workflow-name": "error",
},
},
];

When not to use itโ€‹

You can disable this rule when its policy does not match your repository standards, or when equivalent enforcement is already handled by another policy tool.

Further readingโ€‹