From 09b71370d377ce4d4e0fded5b0d698e754086ae1 Mon Sep 17 00:00:00 2001 From: Caleb Woodbine Date: Wed, 31 May 2023 14:42:11 +1200 Subject: [PATCH] feat: add check vendor dir in presubmit exit on no vendor dir Signed-off-by: Caleb Woodbine --- .github/workflows/reusable-presubmit-go-mod-vendor.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/reusable-presubmit-go-mod-vendor.yml b/.github/workflows/reusable-presubmit-go-mod-vendor.yml index 04ecdd7..effe483 100644 --- a/.github/workflows/reusable-presubmit-go-mod-vendor.yml +++ b/.github/workflows/reusable-presubmit-go-mod-vendor.yml @@ -16,6 +16,9 @@ jobs: - id: changes name: determine changes run: | + if [ ! -d ./vendor ]; then + exit 0 + fi git add --all ./vendor if ( git ls-files --other --directory --exclude-standard | grep 'vendor/' || git diff --name-only --diff-filter=ACMRT | grep 'vendor/' ); then echo "changes=true" >> $GITHUB_OUTPUT