sigs.k8s.io/kubebuilder/v3@v3.14.0/.github/workflows/apidiff.yml (about)

     1  name: APIDiff
     2  
     3  # Trigger the workflow on pull requests and direct pushes to any branch
     4  on:
     5    push:
     6    pull_request:
     7  
     8  jobs:
     9    go-apidiff:
    10      name: Verify API differences
    11      runs-on: ubuntu-latest
    12      # Pull requests from different repository only trigger this checks
    13      if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
    14      steps:
    15        - name: Clone the code
    16          uses: actions/checkout@v4
    17          with:
    18            fetch-depth: 0
    19        - name: Setup Go
    20          uses: actions/setup-go@v5
    21          with:
    22            go-version: "~1.21"
    23        - name: Execute go-apidiff
    24          uses: joelanford/go-apidiff@v0.8.2
    25          with:
    26            compare-imports: true
    27            print-compatible: true