flowpactworkflow contracts
Rules

FP301 · undefined-output-ref

An expression reads an output (`needs.*`, `jobs.*`, `steps.*`) that is never defined.

CodeNameCategoryDefault severity
FP301undefined-output-refOutputs🔴 error

Why it matters

Undefined outputs evaluate to an empty string. Downstream jobs then run with missing versions, tags or flags.

How to fix

Fix the output name, declare the output on the job/workflow/action, or reference the right job or step.

Example

jobs:
  build:
    outputs:
      version: ${{ steps.meta.outputs.version }}
  deploy:
    needs: build
    run: deploy ${{ needs.build.outputs.vesion }}

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:
  FP301: off
  # or: undefined-output-ref: error

Explain it in the terminal:

flowpact explain FP301

On this page