FP304 · step-output-never-written
An output is read from a step whose inline script (`run:` or `actions/github-script`) writes other outputs, but never this one.
| Code | Name | Category | Default severity |
|---|---|---|---|
FP304 | step-output-never-written | Outputs | 🟡 warning |
Why it matters
The read evaluates to an empty string. This is typically a typo in the echo "name=value" \>\> $GITHUB_OUTPUT line.
How to fix
Write the output in the step (echo "\<name\>=\<value\>" \>\> "$GITHUB_OUTPUT") or read the name it actually writes.
Scope
Only scripts whose writes flowpact can name are judged. A step is skipped when its writes cannot be seen: cat file \>\> "$GITHUB_OUTPUT", a computed name (core.setOutput(name, …)), or an actions/github-script script that loads a module (require(), import(); Node built-ins like fs aside), runs a program (exec.exec()), hands core to other code (run(\{ core \})), or takes code from an expression (script: $\{\{ inputs.code \}\}). Words in strings, comments and template text do not count. Steps of other actions are not judged, since an action may set outputs of its own. Not reported in generated files, which are not edited by hand.
Example
- id: meta
run: echo "ver=1.2.3" >> "$GITHUB_OUTPUT"
...
version: ${{ steps.meta.outputs.version }}Configure
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP304: off
# or: step-output-never-written: errorExplain it in the terminal:
flowpact explain FP304