You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot extract release version from branch name #697
I have a release pipeline that needs to take the version from the branch name, following the pattern release/*, ie release/4.8.4.
As per the documentation, the branch name can be taken from the environment variable GITHUB_REF.
To overcome the lack of substring limitation in GitHub actions I have created a JavaScript action that takes some inputs and returns a slice of the string, for example from release/4.8.4 will return 4.8.4.
The issue comes when passing the $GITHUB_REF to the action:
The return value in the expression ${{ steps.release_name.outputs.result }} would be expected to contain 4.8.4.
Instead it contains REF as you can verify in this build. That means that the GITHUB_REF env. variable has not been parsed but taken as a string instead.
I have tried passing the input as $GITHUB_REF, ${ GITHUB_REF } and ${{ GITHUB_REF }} and none of them works.
This is blocking a fix release so if there is an alternative way please share it. Thank you.
To Reproduce
Try to extract a version from the branch name. If you find a way to do it, please close this issue but for now this is a major limitation.
Expected behavior
The environment variable GITHUB_REF should be suitable for use as an action input.
Desktop (please complete the following information):
Activity
AlexandrouR commentedon Jul 9, 2021
Any update on this ?