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
Convert Actions Expression Array into a bash array
ChristopherHX edited this page Dec 5, 2022
·
1 revision
This snippet uses the join function to initialize a bash array with matrix.args as long no line contains EOF as the only word
on: pushjobs:
_:
runs-on: ubuntu-lateststrategy:
matrix:
include:
- args:
- test with space
- another test
- | my multiline input Help Me True tragic steps:
- run: | args=(${{ matrix.args[0] && format('"$(cat << "EOF" {0} EOF )"', join(matrix.args, ' EOF )" "$(cat << "EOF" ')) || ''}}) # You have your bash array args from the matrix key echo "${args[@]}"