Skip to main content

require-action-run-name

Rule catalog ID: R006

Targeted pattern scopeโ€‹

GitHub Actions workflow YAML files.

What this rule reportsโ€‹

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

Why this rule existsโ€‹

A descriptive run-name helps distinguish workflow runs triggered from different branches, releases, or manual dispatches.

โŒ Incorrectโ€‹

name: Release
on:
workflow_dispatch:

โœ… Correctโ€‹

name: Release
run-name: Release ${{ github.ref_name }}
on:
workflow_dispatch:

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-run-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โ€‹