name: Conventional Commits

on: pull_request

permissions:
  contents: read

jobs:
  linting:
    name: Linting
    runs-on: ubuntu-24.04
    container:
      image: ghcr.io/developerc286/conventional_commits_linter:0.17.0@sha256:d6fb0dfd79c2e06897692bc3f0dc62bcb7ce90a92030c81a3137935516d525d7
    steps:
      - name: Checkout code.
        uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 0
      - name: Check Conventional Commits linting.
        run: conventional_commits_linter --type angular "origin/${{ github.base_ref }}"
