I have the following list of files in bash
[ foo_file1.yaml, file2.yaml, anotherfile.yaml ]
I want to filter out files matching the pattern foo*.yaml
The following test does not seem to work
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == foo*.yaml ]]; then
echo $file
fi
(it is from a step in a GHA job but I don't think this is relevant)
Any suggestions?
edit: I have also tried this
echo $file | grep -e 'foo*\.yaml'
still doesn't work.