aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2020-12-10 17:01:51 +0000
committerGitHub <noreply@github.com>2020-12-10 17:01:51 +0000
commit6c4b6531fe8fed46bec54fae993a1bab8246dd7d (patch)
treedbe9ad71cbccafee465545cdf7180e65694e4630 /.github
parent82bb47a2f12429dda49886571173024cc8b80357 (diff)
downloadqmk_firmware-6c4b6531fe8fed46bec54fae993a1bab8246dd7d.tar.gz
qmk_firmware-6c4b6531fe8fed46bec54fae993a1bab8246dd7d.zip
CI: Add workflow for codebase formatting (#7382)
* Add workflow for codebase formatting * stash * review comments * Swap to a more complete push action
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/format.yaml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml
new file mode 100644
index 000000000..ac0835c3a
--- /dev/null
+++ b/.github/workflows/format.yaml
@@ -0,0 +1,34 @@
1name: Format Codebase
2
3on:
4 push:
5 branches:
6 - master
7
8jobs:
9 generate:
10 runs-on: ubuntu-latest
11 container: qmkfm/base_container
12
13 # protect against those who develop with their fork on master
14 if: github.repository == 'qmk/qmk_firmware'
15
16 steps:
17 - uses: actions/checkout@v2
18
19 - name: Install dependencies
20 run: |
21 apt-get update && apt-get install -y dos2unix
22
23 - name: Format files
24 run: |
25 bin/qmk cformat
26 bin/qmk pyformat
27 bin/qmk fileformat
28
29 - name: Commit files
30 uses: stefanzweifel/git-auto-commit-action@v4
31 with:
32 commit_message: "Format code according to conventions for ${GITHUB_SHA}"
33 commit_user_name: QMK Bot
34 commit_user_email: hello@qmk.fm