Skip to content

Composite: Step Outputs are not available when in nested composite actions #2009

@antdking

Description

@antdking

Describe the bug
When a workflow uses a composite action, the post steps of actions within the Composite have their inputs evaluated with the Steps context.

However when the same Composite Action is nested in another Composite Action, the Steps context is lost for the Post steps.

Our usecase for wanting this is to cache dependencies effectively without polluting our Workflows.

To Reproduce
workflow uses a composite that uses a composite.

Reproduced here: https://github.com/antdking/composite-post-step-outputs-demo, specifically this workflow
This run includes debug output: https://github.com/antdking/composite-post-step-outputs-demo/actions/runs/2710027823

Expected behavior
Able to use Post steps for Composite Actions that are used by other Composite Actions.

Runner Version and Platform

Hosted runner, affects all Platforms

What's not working?

Please include error messages and screenshots.

When executing the Post Run for the wrapping composite:

 ##[debug]Evaluating condition for step: 'Post wrapperComposite'
##[debug]Evaluating: always()
##[debug]Evaluating always:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Post wrapperComposite
##[debug]Loading inputs
##[debug]Loading env
Post job cleanup.
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: always()
##[debug]Evaluating always:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: run
##[debug]Loading inputs
##[debug]Evaluating: steps.setter.outputs.some-val
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating steps:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'setter'
##[debug]....=> null
##[debug]..=> null
##[debug]=> null
##[debug]Result: null
##[debug]Loading env
Post job cleanup.
value received: 
Error: value: '' is not 'foo'
##[debug]Node Action run completed with exit code 1
##[debug]Finished: run
##[debug]Finishing: Post wrapperComposite

the setter Step seems to be missing when evaluating the post steps.

Runner and Worker's Diagnostic Logs

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions