I want to cat
the contents of my VERSION file (e.g. 0.9.0
) into a variable and pass it to another GitHub action as input. However, from what I can tell, this requires creating a new GitHub action just to cat the file to an 'output' which could then be used as input
to the next module.
Is there a GitHub action that already does this - or is there some simpler solution I'm missing?
I don't think you need to create an action for this. cat
should be usable in a run
step.
Try something like this:
- name: Get version
id: vars
run: echo ::set-output name=version::$(cat VERSION)
- name: Test output
run: echo ${{ steps.vars.outputs.version }}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With