Skip to content

Commit

Permalink
fix: wrong yamllint skip
Browse files Browse the repository at this point in the history
Fixes by splitting the string and iterating over it
  • Loading branch information
danctorres committed Nov 15, 2024
1 parent 431d135 commit b1d8440
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,15 @@ jobs:
pip install yamllint
- name: Lint YAML files
run: |-
if echo "${{ steps.changed_files.outputs.all }}" | grep -qE '\.(yml|yaml)$'; then
IFS=' ' read -r -a files <<< "${{ steps.changed_files.outputs.all }}"
yaml_files=()
for file in "${files[@]}"; do
if [[ "$file" == *.yaml || "$file" == *.yml ]]; then
yaml_files+=("$file")
fi
done
if [ ${#yaml_files[@]} -gt 0 ]; then
echo -e "Running yamllint"
yamllint . || exit 1
else
Expand Down

0 comments on commit b1d8440

Please sign in to comment.