-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multi-string support for variable values #5
Comments
Hi @air3ijai, I can confirm this feature is not working at the moment and I couldn't bypass it myself. Furthermore, it works with plain GitHub strategy matrices, so it seems reasonable for me to implement. So I am starting to implement this feature. |
Hi @air3ijai Update: I rewrote the action with Python and it seems to work for virtually any case (special characters/spaces/multilines in both variable name and values) now. Here is your workflow using the new version and its corresponding run. Breaking Changes: since had to parse many edge cases I stepped back from my "own" format to classic YAML as a string. Flow and non-flow YAML syntaxes are both supported. Basically, if you had strategy:
matrix:
variable1: [value1, value2]
variable2: [value1, value2]
include:
- variable1: value3
- variable2: value3 variable3: value1
exclude:
- variable1: value1 variable2: value2 now just copy-paste it to the actions inputs: steps:
- uses: druzsan/setup-matrix@feature/use-python-dockerfile
with:
matrix: |
variable1: [value1, value2]
variable2: [value1, value2]
include: |
- variable1: value3
- variable2: value3 variable3: value1
exclude: |
- variable1: value1 variable2: value2 WIP: the feature is not released yet, I need some more time to test it out. So you can use the branch specified ( If you have some feedback, feel free to share it. |
Hi, @druzsan - just did a check and it works as expected for our case and we can pass matrix to reusable workflow. Thank you for the implementation! Basically, now we have a copy paste from the existing matrix syntax |
Hi @air3ijai, I am happy it works for you! My thoughts were that since there is now no difference in syntax between strategy matrix and usage of action (up to that the latter is a string) it is better to let just one argument I am currently preparing some testing and will release a new version soon. |
Hi @air3ijai, the new version is released, since now you can use action as |
We are trying to check how to use that action with
include
and it fails with our case (shell: bash -e
), which is expected as described in the documentationThe text was updated successfully, but these errors were encountered: