commitlint.yml 952 B

12345678910111213141516171819202122232425262728293031323334353637
  1. name: Commitlint
  2. on:
  3. push:
  4. tags:
  5. - v*
  6. branches:
  7. - master
  8. - release-*
  9. pull_request:
  10. branches:
  11. - master
  12. - release-*
  13. # cancel the in-progress workflow when PR is refreshed.
  14. concurrency:
  15. group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
  16. cancel-in-progress: true
  17. permissions:
  18. contents: read
  19. jobs:
  20. lint:
  21. permissions:
  22. contents: read # for actions/checkout to fetch code
  23. pull-requests: read # for wagoid/commitlint-github-action to get commits in PR
  24. runs-on: ubuntu-20.04
  25. env:
  26. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  27. steps:
  28. - uses: actions/checkout@v4
  29. with:
  30. fetch-depth: 0
  31. - uses: wagoid/commitlint-github-action@v5.4.4
  32. with:
  33. configFile: "./.commitlintrc.json"
  34. helpURL: https://rook.io/docs/rook/latest/Contributing/development-flow/#commit-structure