Skip to content

Commit

Permalink
CI: add for vendor check fix for #1072
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Yuan <[email protected]>
  • Loading branch information
SamYuan1990 committed Nov 21, 2023
1 parent 0e3fe8b commit 8a7cd6b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,22 @@ jobs:
with:
go-version-file: go.mod
- name: run vulnerability detect
run: make govulncheck
run: make govulncheck

vendor:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: run go mod check
run: go mod tidy && go mod vendor
- name: Compare the expected and actual vendor directories
run: |
if [ "$(git diff --ignore-space-at-eol vendor/ | wc -l)" -gt "0" ]; then
echo "Detected different on vendor folder. See status below:"
git diff
exit 1
fi
id: diff

0 comments on commit 8a7cd6b

Please sign in to comment.