Skip to content

Commit

Permalink
Checked the results of linting
Browse files Browse the repository at this point in the history
Signed-off-by: hansinikarunarathne <107214435+hansinikarunarathne@users.noreply.github.com>
  • Loading branch information
hansinikarunarathne committed Jul 19, 2024
1 parent a290e0d commit 14d3a5c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/yaml_formatter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ jobs:
run: cat changed_files_in_PR.txt

- name: Run yamllint on changed files
id: lint
run: |
if [ -s changed_files_in_PR.txt ]; then
cat changed_files_in_PR.txt | xargs -I {} yamllint {} || exit 1
else
if grep -q 'No YAML files have changed in this PR.' changed_files_in_PR.txt; then
echo "No YAML files have changed in this PR."
else
cat changed_files_in_PR.txt | xargs -I {} yamllint {} || exit 1
fi
shell: bash

- name: Check YAML lint results
if: success()
if: success() && steps.lint.outcome == 'success'
run: echo "No styling issues with YAML files."
shell: bash

0 comments on commit 14d3a5c

Please sign in to comment.