format.yaml 866 B

12345678910111213141516171819202122232425262728293031323334353637
  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. with:
  15. token: ${{ secrets.API_TOKEN_GITHUB }}
  16. - name: Install dependencies
  17. run: |
  18. apt-get update && apt-get install -y dos2unix
  19. - name: Format files
  20. run: |
  21. bin/qmk cformat -a
  22. bin/qmk pyformat
  23. bin/qmk fileformat
  24. - name: Commit files
  25. uses: stefanzweifel/git-auto-commit-action@v4
  26. with:
  27. commit_message: Format code according to conventions for $GITHUB_SHA
  28. commit_user_name: QMK Bot
  29. commit_user_email: hello@qmk.fm
  30. commit_author: QMK Bot <hello@qmk.fm>