From 62f23e8dabd77eaad84e888877627e6a18170c90 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Mon, 20 Nov 2023 08:10:57 -0800 Subject: [PATCH] ci: run commitlint action on PRs only --- .github/workflows/ci-cd.yml | 3 +-- .github/workflows/commitlint.yml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/commitlint.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 062cbd20..0f32e345 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -22,8 +22,7 @@ jobs: TRIGGER_DEPLOY: ${{ startsWith(github.ref, 'refs/heads/master') }} steps: - uses: actions/checkout@v4 - - uses: wagoid/commitlint-github-action@v5 - if: github.event_name == 'pull_request' + - uses: actions/setup-node@v3 with: cache: "npm" diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 00000000..68298687 --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,13 @@ +name: Lint commit messages +on: [pull_request] + +concurrency: + group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" + cancel-in-progress: true + +jobs: + commitlint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: wagoid/commitlint-github-action@v5