Skip to content

Commit

Permalink
Merge pull request #6607 from sbueringer/pr-fix-dependabot-action
Browse files Browse the repository at this point in the history
🐛 dependabot: implement workaround to run generate-go-openapi in GOPATH
  • Loading branch information
k8s-ci-robot authored Jun 9, 2022
2 parents 53f0eca + fc7c18c commit da2d8be
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.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/[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 da2d8be

Please sign in to comment.