Using output from a run command in a future step #26139
-
I have a complex command
How can I grab just what I need from the output of |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
I just tried:
Inside of the script
Then using the exported ENVAR like:
But ${{ env.GA_DOCKER_IMAGE }} is empty. Any ideas? |
Beta Was this translation helpful? Give feedback.
-
Try:
|
Beta Was this translation helpful? Give feedback.
-
Hi @nodesocket , You need to filter the output result of the dockebuild.sh file, eg: use ‘grep’. For instance, two outputs in sh file:
Then in workflow yaml file:
Or directly use ‘set-env’ in dockebuild.sh file:
then you can invoke it in yaml file with ‘$GA_DOCKER_IMAGE’ and used as action parameters.
Hope it helps! |
Beta Was this translation helpful? Give feedback.
-
Thanks @weide-zhou and @rbellamy: I will try this. What is this syntax? Is it specific to running inside of a GitHub action bash script?
|
Beta Was this translation helpful? Give feedback.
-
Please check the link for more details about ‘set-env’. Actually it’s a wrapped github action function which described here, it’s only used in Github actions. Thanks. |
Beta Was this translation helpful? Give feedback.
Hi @nodesocket ,
You need to filter the output result of the dockebuild.sh file, eg: use ‘grep’.
For instance, two outputs in sh file:
Then in workflow yaml file:
Or directly use ‘set-env’ in dockebuild.sh file:
then you can invoke it in yaml file with ‘$GA_DOCKER_IMAGE’ and used as action parameters.