From ca10fa7b6f9d3801b146aaab9b1e2c06e0a043dd Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Mon, 9 Dec 2024 16:48:28 -0800 Subject: [PATCH] [chore] Fix check-codeowners: path needs to be updated on its own step (#36732) Path for the tool needs to be updated on its own step, prior to using the tool. --- .github/workflows/check-codeowners.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)