ci: Update workflow to fix param issue of run_tdgpt_test
This commit is contained in:
parent
07cac9b841
commit
7d218e3891
|
@ -32,8 +32,17 @@ jobs:
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
target_branch=${{ github.event.pull_request.base.ref }}
|
target_branch=${{ github.event.pull_request.base.ref }}
|
||||||
|
|
||||||
# Check whether to run tdgpt test cases
|
# Fetch the latest code from the target branch
|
||||||
cd ${{ env.WKC }}
|
cd ${{ env.WKC }}
|
||||||
|
git reset --hard
|
||||||
|
git clean -f
|
||||||
|
git remote prune origin
|
||||||
|
git fetch
|
||||||
|
git checkout "$target_branch"
|
||||||
|
git remote prune origin
|
||||||
|
git pull >/dev/null
|
||||||
|
|
||||||
|
# Check whether to run tdgpt test cases
|
||||||
changed_files_non_doc=$(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD $target_branch) | grep -v "^docs/en/" | grep -v "^docs/zh/" | grep -v ".md$" | tr '\n' ' ' || :)
|
changed_files_non_doc=$(git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD $target_branch) | grep -v "^docs/en/" | grep -v "^docs/zh/" | grep -v ".md$" | tr '\n' ' ' || :)
|
||||||
echo "changed files exclude doc: ${changed_files_non_doc}"
|
echo "changed files exclude doc: ${changed_files_non_doc}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue