mirror of
https://gitee.com/rancher/rancher.git
synced 2025-12-06 07:49:17 +08:00
Update GitHub Actions workflow to add 'go generate' step, and use latest checkout and script versions
This commit is contained in:
8
.github/workflows/go-get.yml
vendored
8
.github/workflows/go-get.yml
vendored
@@ -30,9 +30,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Run go get to get Go module
|
||||
run: make go-get
|
||||
- name: Run go generate
|
||||
run: |
|
||||
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.12.0
|
||||
go generate ./...
|
||||
- name: Check for repository changes
|
||||
run: |
|
||||
if git diff --name-only --exit-code; then
|
||||
@@ -69,7 +73,7 @@ jobs:
|
||||
- name: Create Pull Request
|
||||
if: ${{ env.changes_exist == 'true' }}
|
||||
id: cpr
|
||||
uses: actions/github-script@v5.0.0
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
SOURCE_BRANCH: ${{ steps.branch.outputs.branch }}
|
||||
with:
|
||||
|
||||
@@ -18,4 +18,3 @@ done
|
||||
go get -d "${MODULE}@${VERSION}"
|
||||
go mod tidy
|
||||
go mod verify
|
||||
go generate ./...
|
||||
|
||||
Reference in New Issue
Block a user