From 880a7a0187f0cb34132baa706d4a48d1ef5b8912 Mon Sep 17 00:00:00 2001 From: yugo kobayashi Date: Wed, 8 Jan 2025 03:58:29 +0900 Subject: [PATCH] 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 d8fd5020dcdf0bd6cb969c9e9b9b53520bea09c2. --- .github/workflows/go.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2a35978ca..d735c6366 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,6 +25,26 @@ jobs: doc: - 'site/**' + check-modules: + name: check-synced-go-modules + needs: conditional-changes + # if: needs.conditional-changes.outputs.doc == 'false' + runs-on: [ubuntu-latest] + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go 1.x + uses: actions/setup-go@v5 + with: + go-version-file: go.work + id: go + - name: sync go modules + run: make workspace-sync + - name: check for changes with 'make workspace-sync' + run: git diff --exit-code + lint: name: Lint needs: conditional-changes