Skip to main content

require-action-name

Rule catalog ID: R005

Targeted pattern scopeโ€‹

GitHub Actions workflow YAML files.

What this rule reportsโ€‹

This rule reports workflows that omit the top-level name field or set it to a non-string or empty value.

Why this rule existsโ€‹

A workflow name is what most people see first in the Actions UI, run history, and status checks. Requiring it improves discoverability and reviewability.

โŒ Incorrectโ€‹

on:
push:

โœ… Correctโ€‹

name: 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-action-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โ€‹