summaryrefslogtreecommitdiffstats
path: root/.github/workflows/format.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/format.yml')
-rw-r--r--.github/workflows/format.yml14
1 files changed, 9 insertions, 5 deletions
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index b6ce4063fe..78aaae8a0e 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -1,5 +1,8 @@
name: PR Lint Format
+permissions:
+ contents: read
+
on:
pull_request:
paths:
@@ -19,6 +22,9 @@ jobs:
container: qmkfm/qmk_cli
steps:
+ - name: Disable safe.directory check
+ run : git config --global --add safe.directory '*'
+
- uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -27,16 +33,14 @@ jobs:
run: |
pip3 install -r requirements-dev.txt
- - uses: trilom/file-changes-action@v1.2.4
+ - name: Get changed files
id: file_changes
- with:
- output: ' '
- fileOutput: ' '
+ uses: tj-actions/changed-files@v35
- name: Run qmk formatters
shell: 'bash {0}'
run: |
- cat ~/files_added.txt ~/files_modified.txt > ~/files_changed.txt
+ echo '${{ steps.file_changes.outputs.added_files}}' '${{ steps.file_changes.outputs.modified_files}}' > ~/files_changed.txt
qmk format-c --core-only $(< ~/files_changed.txt) || true
qmk format-python $(< ~/files_changed.txt) || true
qmk format-text $(< ~/files_changed.txt) || true