format.yaml 807 B

1234567891011121314151617181920212223242526272829303132333435
  1. name: Format Codebase
  2. on:
  3. push:
  4. branches:
  5. - master
  6. jobs:
  7. format:
  8. runs-on: ubuntu-latest
  9. container: qmkfm/base_container
  10. # protect against those who develop with their fork on master
  11. if: github.repository == 'qmk/qmk_firmware'
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Install dependencies
  15. run: |
  16. apt-get update && apt-get install -y dos2unix
  17. - name: Format files
  18. run: |
  19. bin/qmk cformat -a
  20. bin/qmk pyformat
  21. bin/qmk fileformat
  22. - name: Commit files
  23. uses: stefanzweifel/git-auto-commit-action@v4
  24. with:
  25. commit_message: Format code according to conventions for $GITHUB_SHA
  26. commit_user_name: QMK Bot
  27. commit_user_email: hello@qmk.fm
  28. commit_author: QMK Bot <hello@qmk.fm>