Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable docs change CI skip detection #18775

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions .github/scripts/filter_changed_files_go_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,27 @@ skipped_directories=("docs/" "ui/" "website/" "grafana/")

# Initialize a variable to track directories outside the skipped ones
other_directories=""
trigger_ci=false
trigger_ci=true

# Loop through the changed files and find directories/files outside the skipped ones
for file_to_check in $files_to_check; do
file_is_skipped=false
for dir in "${skipped_directories[@]}"; do
if [[ "$file_to_check" == "$dir"* ]] || [[ "$file_to_check" == *.md && "$dir" == *"/" ]]; then
file_is_skipped=true
break
fi
done
if [ "$file_is_skipped" = "false" ]; then
other_directories+="$(dirname "$file_to_check")\n"
trigger_ci=true
echo "Non doc file(s) changed - triggered ci: $trigger_ci"
echo -e $other_directories
echo "trigger-ci=$trigger_ci" >>"$GITHUB_OUTPUT"
exit 0 ## if file is outside of the skipped_directory exit script
fi
done
# # Loop through the changed files and find directories/files outside the skipped ones
# for file_to_check in $files_to_check; do
# file_is_skipped=false
# for dir in "${skipped_directories[@]}"; do
# if [[ "$file_to_check" == "$dir"* ]] || [[ "$file_to_check" == *.md && "$dir" == *"/" ]]; then
# file_is_skipped=true
# break
# fi
# done
# if [ "$file_is_skipped" = "false" ]; then
# other_directories+="$(dirname "$file_to_check")\n"
# trigger_ci=true
# echo "Non doc file(s) changed - triggered ci: $trigger_ci"
# echo -e $other_directories
# echo "trigger-ci=$trigger_ci" >>"$GITHUB_OUTPUT"
# exit 0 ## if file is outside of the skipped_directory exit script
# fi
# done

echo "Only doc file(s) changed - triggered ci: $trigger_ci"
# echo "Only doc file(s) changed - triggered ci: $trigger_ci"
echo "Doc file(s) change detection is currently disabled - triggering ci"
echo "trigger-ci=$trigger_ci" >>"$GITHUB_OUTPUT"
Loading