diff --git a/.github/workflows/check-codeowners.yaml b/.github/workflows/check-codeowners.yaml index 3864ece775d3..d264551eda4d 100644 --- a/.github/workflows/check-codeowners.yaml +++ b/.github/workflows/check-codeowners.yaml @@ -46,16 +46,18 @@ jobs: needs: [setup-environment] steps: - uses: actions/checkout@v4 + - name: Gen githubgen tool + if: github.repository == 'open-telemetry/opentelemetry-collector-contrib' + run: | + make githubgen-install + echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - uses: actions/checkout@v4 with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} path: pr - name: Gen CODEOWNERS - if: github.repository == 'open-telemetry/opentelemetry-collector-contrib' run: | - make githubgen-install cd pr - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH GITHUB_TOKEN=${{ secrets.READ_ORG_AND_USER_TOKEN }} githubgen git diff -s --exit-code || (echo 'Generated code is out of date, please apply this diff and commit the changes in this PR.' && git diff && exit 1)