ansible-nas/tests/github-test-matrix.sh
2022-09-09 23:52:17 +01:00

11 lines
296 B
Bash
Executable file

#!/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
echo "::set-output name=matrix::$(echo $test_matrix | jq -R -s -c 'sub("\n"; " ") | split(" ")[:-1]')"