diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 12cc4a9..c33cd9a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -23,13 +23,6 @@ jobs: with: go-version: '1.21.5' - - name: make lint - run: make golangci-lint && GOLANGCI_LINT_EXTRA_ARGS=--timeout=1h make lint - - - uses: actions/setup-node@v3 - with: - node-version: 14 - - name: make build run: make build @@ -38,16 +31,3 @@ jobs: - name: make test run: make test - - - name: Install commitlint - run: | - npm install conventional-changelog-conventionalcommits - npm install commitlint@latest - - - name: Validate current commit (last commit) with commitlint - if: github.event_name == 'push' - run: npx commitlint --from HEAD~1 --to HEAD --verbose - - - name: Validate PR commits with commitlint - if: github.event_name == 'pull_request' - run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose diff --git a/.github/workflows/pull-request-lint.yaml b/.github/workflows/pull-request-lint.yaml new file mode 100644 index 0000000..979b6ae --- /dev/null +++ b/.github/workflows/pull-request-lint.yaml @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT + +name: "lint Pull Request title" + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +permissions: + pull-requests: read + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}