@@ -149,6 +149,58 @@ jobs:
149
149
status : ${{ job.status }}
150
150
webhook-url : ${{ secrets.SLACK_WEBHOOK }}
151
151
152
+ go-govulncheck :
153
+ runs-on : ubuntu-latest
154
+
155
+ steps :
156
+ - uses : actions/checkout@v5
157
+
158
+ - uses : actions/setup-go@v6
159
+ with :
160
+ go-version-file : go.mod
161
+ cache : true
162
+ - run : go install golang.org/x/vuln/cmd/govulncheck@latest
163
+
164
+ - uses : ruby/setup-ruby@v1
165
+ with :
166
+ ruby-version : ruby
167
+ bundler-cache : true
168
+
169
+ - name : export CGO_CFLAGS for govulncheck
170
+ run : bundle exec rake go:build_envs[CGO_CFLAGS] >> $GITHUB_ENV
171
+ - run : echo $CGO_CFLAGS
172
+
173
+ - name : export BUILD_TAG for govulncheck
174
+ run : echo "BUILD_TAG=$(bundle exec rake go:build_tag)" >> $GITHUB_ENV
175
+ - run : echo $BUILD_TAG
176
+
177
+ # FIXME: Workaround for following error
178
+ #
179
+ # govulncheck: loading packages: err: exit status 1: stderr: go: inconsistent vendoring in /home/runner/work/go-gem-wrapper/go-gem-wrapper:
180
+ # github.com/stretchr/testify@v1.11.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
181
+ # github.com/davecgh/go-spew@v1.1.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
182
+ # github.com/pmezard/go-difflib@v1.0.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
183
+ # gopkg.in/yaml.v3@v3.0.1: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
184
+ #
185
+ # To ignore the vendor directory, use -mod=readonly or -mod=mod.
186
+ # To sync the vendor directory, run:
187
+ # go mod vendor
188
+ - run : rm -rf vendor/
189
+
190
+ # FIXME: golang/govulncheck-action@v1 doesn't support `-tags` arg
191
+ # - uses: golang/govulncheck-action@v1
192
+ # with:
193
+ # go-version-file: go.mod
194
+ - run : govulncheck -format text -tags "${BUILD_TAG}" ./...
195
+
196
+ - name : Slack Notification (not success)
197
+ uses : act10ns/slack@v2
198
+ if : " ! success()"
199
+ continue-on-error : true
200
+ with :
201
+ status : ${{ job.status }}
202
+ webhook-url : ${{ secrets.SLACK_WEBHOOK }}
203
+
152
204
ruby-lint :
153
205
runs-on : ubuntu-latest
154
206
@@ -230,6 +282,7 @@ jobs:
230
282
needs :
231
283
- build-and-test
232
284
- go-lint
285
+ - go-govulncheck
233
286
- ruby-lint
234
287
- ruby-rbs
235
288
- go_gem
0 commit comments