Skip to content

Commit 880a7a0

Browse files
authored
add go work verification step for github actions (#5833)
* add go work verification step for github actions * failure-example_this_commit_will_be_failed_to_check_go_work_sync * Revert "failure-example_this_commit_will_be_failed_to_check_go_work_sync" This reverts commit d8fd502.
1 parent 2867f35 commit 880a7a0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/go.yml

+20
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,26 @@ jobs:
2525
doc:
2626
- 'site/**'
2727
28+
check-modules:
29+
name: check-synced-go-modules
30+
needs: conditional-changes
31+
# if: needs.conditional-changes.outputs.doc == 'false'
32+
runs-on: [ubuntu-latest]
33+
steps:
34+
- name: Check out code into the Go module directory
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
38+
- name: Set up Go 1.x
39+
uses: actions/setup-go@v5
40+
with:
41+
go-version-file: go.work
42+
id: go
43+
- name: sync go modules
44+
run: make workspace-sync
45+
- name: check for changes with 'make workspace-sync'
46+
run: git diff --exit-code
47+
2848
lint:
2949
name: Lint
3050
needs: conditional-changes

0 commit comments

Comments
 (0)