ci(main): fix pr controllers build (#2564)

* ci(main): fix pr controllers build

Signed-off-by: cuisongliu <cuisongliu@qq.com>

* ci(main): fix pr controllers build

Signed-off-by: cuisongliu <cuisongliu@qq.com>

* ci(main): fix pr controllers build

Signed-off-by: cuisongliu <cuisongliu@qq.com>

* ci(main): fix pr controllers build

Signed-off-by: cuisongliu <cuisongliu@qq.com>

* ci(main): fix pr controllers build

Signed-off-by: cuisongliu <cuisongliu@qq.com>

---------

Signed-off-by: cuisongliu <cuisongliu@qq.com>
This commit is contained in:
cuisongliu
2023-02-13 22:46:35 +08:00
committed by GitHub
parent e4e06e18eb
commit c569f0d59c
9 changed files with 343 additions and 88 deletions
+7 -2
View File
@@ -1,8 +1,13 @@
#!/bin/bash
# Recursively finds all directories with a go.mod file and creates
# a GitHub Actions JSON output option. This is used by the linter action.
set -eu
FIND_VAR=${1:-.}
echo "Resolving modules in $(pwd)"
PATHS=$(find . -type f -name go.mod -printf '{"workdir":"%h"},')
echo "::set-output name=matrix::{\"include\":[${PATHS%?}]}"
PATHS=$(find $FIND_VAR -type f -name go.mod -printf '{"workdir":"%h"},')
if [[ $FIND_VAR == "." ]]; then
PATHS=$(find $FIND_VAR ! -path './controllers/*' ! -path './webhooks' ! -path './service' -type f -name go.mod -printf '{"workdir":"%h"},')
fi
echo matrix="{\"include\":[${PATHS%?}]}" >> $GITHUB_OUTPUT