flowpactworkflow contracts
Rules

FP304 · step-output-never-written

An output is read from a `run:` step whose script writes other outputs, but never this one.

CodeNameCategoryDefault severity
FP304step-output-never-writtenOutputs🟡 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.

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:

.github/flowpact/flowpact.config.yml
rules:
  FP304: off
  # or: step-output-never-written: error

Explain it in the terminal:

flowpact explain FP304

On this page