diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index 72c2c7f2269b..0361395505cb 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -19,8 +19,15 @@ jobs: with: go-version: '1.18' id: go + # Note: We have to run everything in the GOPATH as `make generate-go-openapi` + # currently does not work outside of the GOPATH, see: + # https://github.com/kubernetes-sigs/cluster-api/issues/6526 - name: Check out code into the Go module directory uses: actions/checkout@v3 + with: + path: './src/sigs.k8s.io/cluster-api' + - name: Set env + run: echo "GOPATH=${GITHUB_WORKSPACE}" >> $GITHUB_ENV - uses: actions/cache@v3.0.3 name: Restore go cache with: @@ -32,8 +39,10 @@ jobs: ${{ runner.os }}-go- - name: Update all modules run: make generate-modules + working-directory: './src/sigs.k8s.io/cluster-api' - name: Update generated code run: make generate + working-directory: './src/sigs.k8s.io/cluster-api' - uses: EndBug/add-and-commit@v9 name: Commit changes with: @@ -41,3 +50,4 @@ jobs: author_email: 49699333+dependabot[bot]@users.noreply.github.com default_author: github_actor message: 'Update generated code' + cwd: './src/sigs.k8s.io/cluster-api'