From cf29b3ed2c6dcbbc861a4f59556294fd303bfe44 Mon Sep 17 00:00:00 2001 From: iverly Date: Tue, 24 Oct 2023 15:27:01 +0200 Subject: [PATCH] feat(ci): add conventional commits check Signed-off-by: iverly --- .github/workflows/check.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/check.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..8222692 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,26 @@ +name: Check + +on: + pull_request: + branches: [main] + types: [opened, edited, synchronize] + +jobs: + conventional-commit: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v2 + with: + node-version: "14" + - name: Install dependencies + run: npm install @commitlint/config-conventional + - name: Configure commitlint + run: | + echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js + - name: Run commitlint + uses: wagoid/commitlint-github-action@v5 + env: + NODE_PATH: ${{ github.workspace }}/node_modules