So I have a github workflow that calls a composite action at the end, regardless of success or failure. I want to pass whether or not the workflow has succeeded to the action to use within it. I have tried passing success()
as bellow, I have also tried writing success into a variable in a step and then calling that variable. Is success()
only able to be called inside a if:
, and if so is there any similar way to get the workflows status.
The code I have tried looks like this:
...previous steps
- name: The step to call the action
if: always()
uses: ./path/to/action
with:
some-token: ${{ inputs.some-token }}
some-value: ${{ inputs.some-value }}
workflow-status: ${{ success() }}
outcome
of this step as a parameter and finally in my action simply check if the input was== success
Thanks @Hooch – Kries