Browse Source

Attempt to fix changed files on CI workflow (#23205)

pull/23225/head
Joel Challis 1 month ago
committed by GitHub
parent
commit
4443fa8a32
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 4 deletions
  1. +2
    -0
      .github/workflows/format.yml
  2. +8
    -4
      .github/workflows/lint.yml

+ 2
- 0
.github/workflows/format.yml View File

@ -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}'


+ 8
- 4
.github/workflows/lint.yml View File

@ -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: |
@ -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


Loading…
Cancel
Save