name: Run apidiff on: [ pull_request ] permissions: contents: read jobs: apidiff: runs-on: ubuntu-latest if: github.base_ref steps: - name: Install Go uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: 1.26.x - name: Add GOBIN to PATH run: echo "PATH=$(go env GOPATH)/bin:$PATH" >>$GITHUB_ENV - name: Install dependencies run: go install golang.org/x/exp/cmd/apidiff@latest - name: Checkout old code uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: ref: ${{ github.base_ref }} path: "old" - name: Checkout new code uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: "new" - name: APIDiff run: ./_tools/apidiff.sh -d ../old working-directory: "new"