Skip to content

Commit

Permalink
Merge pull request #28 from rtCamp/feature/skip-subdirs
Browse files Browse the repository at this point in the history
Add feature to skip any dir/subdir from scanning
  • Loading branch information
mrrobot47 committed Mar 5, 2020
2 parents 2e85532 + bda882b commit 6e2906c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ stars=$(printf "%-30s" "*")
export RTBOT_WORKSPACE="/home/rtbot/github-workspace"
hosts_file="$GITHUB_WORKSPACE/.github/hosts.yml"

# Delete all the folders to be skipped to ignore them from being scanned.
if [[ -n "$SKIP_FOLDERS" ]]; then

folders=(${SKIP_FOLDERS//,/ })

for folder in ${folders[@]}; do
path_of_folder="$GITHUB_WORKSPACE/$folder"
[[ -d "$path_of_folder" ]] && rm -rf $path_of_folder
done
fi

rsync -a "$GITHUB_WORKSPACE/" "$RTBOT_WORKSPACE"
rsync -a /root/vip-go-ci-tools/ /home/rtbot/vip-go-ci-tools
chown -R rtbot:rtbot /home/rtbot/
Expand Down

0 comments on commit 6e2906c

Please sign in to comment.