ci: gate Go jobs on relevant paths and document ENOBUFS #21
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Commit checks | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| concurrency: | |
| group: commitlint-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| commitlint: | |
| if: >- | |
| (github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]') | |
| || (github.event_name == 'push' && github.event.head_commit.author.name != 'dependabot[bot]') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Enforce single-commit PRs | |
| if: github.event_name == 'pull_request' | |
| env: | |
| PR_COMMIT_COUNT: ${{ github.event.pull_request.commits }} | |
| run: test "$PR_COMMIT_COUNT" -eq 1 | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| - name: Install commitlint | |
| run: npm install --no-save --no-package-lock @commitlint/cli @commitlint/config-conventional | |
| - name: Validate PR title | |
| if: github.event_name == 'pull_request' | |
| env: | |
| PR_TITLE: ${{ github.event.pull_request.title }} | |
| run: printf '%s\n' "$PR_TITLE" | npx commitlint --verbose | |
| - name: Validate last commit | |
| run: npx commitlint --last --verbose |