Skip to content

Commit bda882b

Browse files
committed
Add feature to skip any dir/subdir
Signed-off-by: Riddhesh Sanghvi <riddhesh237@gmail.com>
1 parent 2e85532 commit bda882b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

main.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ stars=$(printf "%-30s" "*")
1717
export RTBOT_WORKSPACE="/home/rtbot/github-workspace"
1818
hosts_file="$GITHUB_WORKSPACE/.github/hosts.yml"
1919

20+
# Delete all the folders to be skipped to ignore them from being scanned.
21+
if [[ -n "$SKIP_FOLDERS" ]]; then
22+
23+
folders=(${SKIP_FOLDERS//,/ })
24+
25+
for folder in ${folders[@]}; do
26+
path_of_folder="$GITHUB_WORKSPACE/$folder"
27+
[[ -d "$path_of_folder" ]] && rm -rf $path_of_folder
28+
done
29+
fi
30+
2031
rsync -a "$GITHUB_WORKSPACE/" "$RTBOT_WORKSPACE"
2132
rsync -a /root/vip-go-ci-tools/ /home/rtbot/vip-go-ci-tools
2233
chown -R rtbot:rtbot /home/rtbot/

0 commit comments

Comments
 (0)