Extract character from matrix variable #26350
-
I have a matrix variable setup like this -
How do I extract the numbers from this? I tried doing -
where I try to get the 4th and the 5th character from the string as |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I’m new at GitHub Actions so I don’t know the exact answer; but, I did a little research and … You can’t use BASH commands/logic within your YML workflow. StackOverflow (https://stackoverflow.com/questions/60916931/github-action-does-the-if-have-an-else) says there is no IF-THEN-ELSE. If is actions is of the form (got this from (run step on (if branch/tag is)) if: contains(github.ref, “release”)
You’ll need to restructure your logic … I think. This link has lots of useful documentation(https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions) |
Beta Was this translation helpful? Give feedback.
-
Store the compiler value from matrix as an env variable and use that.
|
Beta Was this translation helpful? Give feedback.
Store the compiler value from matrix as an env variable and use that.