jobs: commitlint: name: commitlint runs-on: - ubuntu-latest steps: - uses: actions/checkout@v6 with: fetch-depth: 0 fetch-tags: true submodules: true - uses: actions/setup-node@v6 with: node-version: 23.1 - name: Install commitlint run: | if [ -f package.json ]; then rm package*.json fi npm install -g @commitlint/cli @commitlint/config-conventional if [ ! -f "commitlint.config.js" ]; then echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js fi - if: github.event_name == 'push' name: Lint Commit Message run: commitlint --from=HEAD~1 --verbose - if: github.event_name == 'pull_request' name: Lint Pull Request run: commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose name: COMMIT LINT 'on': pull_request: {} run-name: COMMIT LINT