diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml new file mode 100644 index 0000000000..fff00dd9bd --- /dev/null +++ b/.github/workflows/commitlint.yml @@ -0,0 +1,26 @@ +name: Commit Message Lint + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + commitlint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.16.1 + + - name: Install dependencies + run: npm install @commitlint/{config-conventional,cli} + + - name: Lint commit messages + run: | + git fetch origin main + npx commitlint --from=dev --to=$GITHUB_SHA --verbose \ No newline at end of file