You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.1 KiB

  1. name: Lint Format
  2. on:
  3. push:
  4. branches:
  5. - master
  6. - develop
  7. jobs:
  8. lint:
  9. runs-on: ubuntu-latest
  10. container: qmkfm/qmk_cli
  11. steps:
  12. - name: Install dependencies
  13. run: |
  14. apt-get update && apt-get install -y dos2unix
  15. - uses: actions/checkout@v2
  16. with:
  17. fetch-depth: 0
  18. - name: Run qmk formatters
  19. shell: 'bash {0}'
  20. run: |
  21. qmk format-c -a
  22. qmk format-python
  23. qmk format-text -a
  24. git diff
  25. - uses: rlespinasse/github-slug-action@v3.x
  26. - name: Become QMK Bot
  27. run: |
  28. git config user.name 'QMK Bot'
  29. git config user.email 'hello@qmk.fm'
  30. - name: Create Pull Request
  31. uses: peter-evans/create-pull-request@v3
  32. if: ${{ github.repository == 'qmk/qmk_firmware'}}
  33. with:
  34. token: ${{ secrets.QMK_BOT_TOKEN }}
  35. delete-branch: true
  36. branch: bugfix/format_${{ env.GITHUB_REF_SLUG }}
  37. author: QMK Bot <hello@qmk.fm>
  38. committer: QMK Bot <hello@qmk.fm>
  39. commit-message: Format code according to conventions
  40. title: '[CI] Format code according to conventions'