question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:23
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
Syttencommented, Sep 5, 2022

No progress on this? It is kind of an important bug…

2reactions
ChristopherHXcommented, Jul 23, 2023

No https://github.com/nikola-jokic/runner/commit/69f84e99251fac57454b9aeb8c0f0daf39187380 is not a fix for the bug described here, the commit message had a typo and was not related to this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Github composite action output can not be set from within a ...
For one of my projects, I am setting an action output from within a bash script that is executed inside a composite action....
Read more >
GitHub Composite Actions - STOP wasting your time and ...
Well, despair not, today I'm showing you how to do just that, using a new GitHub Actions type that has just been released:...
Read more >
GitHub Actions - Composite Run Steps FIRST LOOK - YouTube
You can now create reusable GitHub Actions !. You probably have a lot of scripts to automate many tasks, now you can easily...
Read more >
GitHub Actions: Composite Run Steps
Here's an example of how you can use composite run steps actions: ... name' default: 'No name provided' runs: using: "composite" steps: ...
Read more >
How to start using reusable workflows with GitHub Actions
Step 2: Make your actions accessible across your organization ... Can be nested to have up to 10 composite actions in one workflow....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found