ansible-nas/tests/github-test-matrix.sh

12 lines
295 B
Bash
Raw Normal View History

2022-09-09 22:51:38 +00:00
#!/bin/bash
# Creates a matrix of roles testable by Molecule for GitHub Actions to use
for f in ./roles/*; do
if [[ -d "$f/molecule" ]]; then
test_matrix="${test_matrix} $f"
fi
done
2023-11-26 12:14:13 +00:00
echo "matrix=$(echo $test_matrix | jq -R -s -c 'sub("\n"; " ") | split(" ")[:-1]')" >> $GITHUB_OUTPUT