Skip to main content

Writing Outputs

Any step with an id: can produce key-value outputs by appending to the $GITHUB_OUTPUT file:
The format is key=value, one per line.

Reading Outputs

Later steps in the same job can read outputs using expression syntax:
Athanor replaces ${{ steps.<id>.outputs.<key> }} with the corresponding value before executing the script.

Multiple Outputs

A single step can write multiple outputs:

How It Works Internally

  1. Before each step, Athanor creates a temp file and sets the GITHUB_OUTPUT environment variable to its path
  2. The step script appends key=value lines to this file
  3. After the step exits, Athanor reads the file and records the outputs
  4. Expression patterns in subsequent steps are expanded via string replacement
Only the $\{{ steps.ID.outputs.KEY }} expression pattern is currently supported. Full GitHub Actions expression evaluation (env.*, github.*, functions like contains(), toJSON(), etc.) is not yet implemented.

Limitations

  • Outputs are scoped to a single job. You cannot reference outputs from a step in a different job.
  • Multiline values are not supported (only single-line key=value)
  • $GITHUB_ENV and $GITHUB_PATH are not supported