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.

59 lines
1.3 KiB

  1. name: Lint Format
  2. permissions:
  3. contents: read
  4. on:
  5. push:
  6. branches:
  7. - master
  8. - develop
  9. jobs:
  10. lint:
  11. runs-on: ubuntu-latest
  12. container: ghcr.io/qmk/qmk_cli
  13. steps:
  14. - name: Disable safe.directory check
  15. run : git config --global --add safe.directory '*'
  16. - uses: actions/checkout@v4
  17. with:
  18. fetch-depth: 0
  19. - name: Disable automatic eol conversion
  20. run: |
  21. echo "* -text" > .git/info/attributes
  22. - name: Install dependencies
  23. run: |
  24. pip3 install -r requirements-dev.txt
  25. - name: Run qmk formatters
  26. shell: 'bash {0}'
  27. run: |
  28. qmk format-c -a
  29. qmk format-python -a
  30. qmk format-text -a
  31. git diff
  32. - uses: rlespinasse/github-slug-action@v3.x
  33. - name: Become QMK Bot
  34. run: |
  35. git config user.name 'QMK Bot'
  36. git config user.email 'hello@qmk.fm'
  37. - name: Create Pull Request
  38. uses: peter-evans/create-pull-request@v6
  39. if: ${{ github.repository == 'qmk/qmk_firmware'}}
  40. with:
  41. token: ${{ secrets.QMK_BOT_TOKEN }}
  42. delete-branch: true
  43. branch: bugfix/format_${{ env.GITHUB_REF_SLUG }}
  44. author: QMK Bot <hello@qmk.fm>
  45. committer: QMK Bot <hello@qmk.fm>
  46. commit-message: Format code according to conventions
  47. title: '[CI] Format code according to conventions'