require-template-icon-file-exists
Rule catalog ID: R065
Targeted pattern scopeโ
Workflow-template properties iconName values that refer to local SVG icons.
What this rule reportsโ
Reports local iconName values that do not resolve to an existing *.svg file.
Why this rule existsโ
Broken icon references degrade workflow-template UX.
โ Incorrectโ
{ "iconName": "workflow" }
If workflow.svg does not exist next to the metadata file, this is reported.
โ Correctโ
{ "iconName": "workflow" }
With workflow.svg present in the same directory.
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-icon-file-exists": "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.