-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dependabot: implement workaround to run generate go openapi in GOPATH
- Loading branch information
1 parent
c602633
commit fc7c18c
Showing
1 changed file
with
10 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,8 +19,15 @@ jobs: | |
with: | ||
go-version: '1.17' | ||
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/[email protected] | ||
name: Restore go cache | ||
with: | ||
|
@@ -32,12 +39,15 @@ 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: | ||
author_name: dependabot[bot] | ||
author_email: 49699333+dependabot[bot]@users.noreply.github.com | ||
default_author: github_actor | ||
message: 'Update generated code' | ||
cwd: './src/sigs.k8s.io/cluster-api' |