Skip to content

Commit

Permalink
dependabot: implement workaround to run generate go openapi in GOPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
sbueringer committed Jun 7, 2022
1 parent c602633 commit fc7c18c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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'

0 comments on commit fc7c18c

Please sign in to comment.