name: Git History

on: pull_request

permissions:
  contents: read

jobs:
  clean:
    name: Clean
    runs-on: ubuntu-24.04
    container:
      image: ghcr.io/developerc286/clean_git_history:1.1.5@sha256:b1374591d48393f6b5fcc888f6bc7da05f7d218961f7850112130b1cad78186a
    steps:
      - name: Checkout code.
        uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 0
      - name: Check clean Git history.
        run: clean_git_history "origin/${{ github.base_ref }}"
