Skip to main content

require-workflow-call-output-value

Rule catalog ID: R039

Targeted pattern scopeโ€‹

GitHub Actions workflow YAML files that define reusable workflow outputs under on.workflow_call.outputs.

What this rule reportsโ€‹

This rule reports reusable workflow outputs that omit value or set it to an empty scalar.

Why this rule existsโ€‹

Reusable workflow outputs are part of the public interface exposed to callers. GitHub documents each workflow_call output as having a value, and without that mapping the output cannot return anything meaningful to downstream jobs.

โŒ Incorrectโ€‹

on:
workflow_call:
outputs:
deployment-url:
description: Published deployment URL

โœ… Correctโ€‹

on:
workflow_call:
outputs:
deployment-url:
description: Published deployment URL
value: ${{ jobs.deploy.outputs.url }}

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-workflow-call-output-value": "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โ€‹