name: Generate module diff
on:
  pull_request:
    branches:
      - main
    paths:
      - 'modules/**'

jobs:
  generate_module_diff:
    runs-on: ubuntu-latest
    steps:
      - name: Harden Runner
        uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
        with:
          egress-policy: audit

      - name: Check out PR code
        uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.ref }}
          repository: ${{ github.event.pull_request.head.repo.full_name }}

      - name: Generate module diff ( ⭐ 🔍 Expand here to see the diff ⭐)
        uses: bazelbuild/continuous-integration/actions/bcr-pr-reviewer@b1056241859cba5c27844c2d7e8d39e61d6715f3
        with:
          action-type: diff_module
