name: commitlint

on:
  pull_request:
    branches:
      - "*"
    types:
      - opened
      - edited

jobs:
  check-and-test:
    runs-on: ubuntu-latest
    container: commitlint/commitlint:19.7.1
    steps:
      - uses: actions/checkout@v4
      - name: check PR title
        run: |
          echo "${{ gitea.event.pull_request.title }}" | commitlint --config .commitlintrc.json