mirror of https://github.com/hashicorp/consul
Backport of ci: fix CI skip script hole into release/1.19.x (#21747)
backport of commit 4ffa6cb365
Co-authored-by: Michael Zalimeni <michael.zalimeni@hashicorp.com>
pull/21755/head
parent
dda31b8c70
commit
8aafd3098c
|
@ -13,7 +13,8 @@ set -euo pipefail
|
||||||
#
|
#
|
||||||
# ... `git merge-base origin/$SKIP_CHECK_BRANCH HEAD` would return commit `D`
|
# ... `git merge-base origin/$SKIP_CHECK_BRANCH HEAD` would return commit `D`
|
||||||
# `...HEAD` specifies from the common ancestor to the latest commit on the current branch (HEAD)..
|
# `...HEAD` specifies from the common ancestor to the latest commit on the current branch (HEAD)..
|
||||||
files_to_check=$(git diff --name-only "$(git merge-base origin/$SKIP_CHECK_BRANCH HEAD~)"...HEAD)
|
skip_check_branch=${SKIP_CHECK_BRANCH:?SKIP_CHECK_BRANCH is required}
|
||||||
|
files_to_check=$(git diff --name-only "$(git merge-base origin/$skip_check_branch HEAD~)"...HEAD)
|
||||||
|
|
||||||
# Define the directories to check
|
# Define the directories to check
|
||||||
skipped_directories=("docs/" "ui/" "website/" "grafana/" ".changelog/")
|
skipped_directories=("docs/" "ui/" "website/" "grafana/" ".changelog/")
|
||||||
|
@ -46,4 +47,4 @@ for file_to_check in "${files_to_check_array[@]}"; do
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Changes detected in only documentation files - skipping tests and build"
|
echo "Changes detected in only documentation files - skipping tests and build"
|
||||||
echo "skip-ci=true" >> "$GITHUB_OUTPUT"
|
echo "skip-ci=true" >> "$GITHUB_OUTPUT"
|
||||||
|
|
Loading…
Reference in New Issue