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.1@sha256:2b36fb6c76417a5feedd6136e52d5987cd96408c1ff4cda3f37af86219fe0636
    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 }}"
