Skip to content

Commit

Permalink
Attempt to fix changed files on CI workflow (qmk#23205)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored Mar 5, 2024
1 parent 7836906 commit 4443fa8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v42
with:
use_rest_api: true

- name: Run qmk formatters
shell: 'bash {0}'
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
- name: Get changed files
id: file_changes
uses: tj-actions/changed-files@v42
with:
use_rest_api: true

- name: Print info
run: |
Expand Down Expand Up @@ -62,10 +64,12 @@ jobs:
qmk format-text ${{ steps.file_changes.outputs.all_changed_files}} || true
for file in ${{ steps.file_changes.outputs.all_changed_files}}; do
if ! git diff --quiet $file; then
echo "File '${file}' Requires Formatting"
echo "::error file=${file}::Requires Formatting"
exit_code=$(($exit_code + 1))
if [[ -f $file ]]; then
if ! git diff --quiet $file; then
echo "File '${file}' Requires Formatting"
echo "::error file=${file}::Requires Formatting"
exit_code=$(($exit_code + 1))
fi
fi
done
Expand Down

0 comments on commit 4443fa8

Please sign in to comment.