更新文件变更检查逻辑
This commit is contained in:
parent
670e061545
commit
ff74063961
@ -21,15 +21,15 @@ jobs:
|
||||
run: |
|
||||
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} || git diff --name-only HEAD~1 HEAD)
|
||||
|
||||
MD_ONLY=true
|
||||
IMPORTANT_FILE_CHANGED=false
|
||||
for file in $CHANGED_FILES; do
|
||||
if [[ ! $file =~ \.md$ ]]; then
|
||||
MD_ONLY=false
|
||||
if [[ $file =~ \.(ts|yaml|json|js)$ ]]; then
|
||||
IMPORTANT_FILE_CHANGED=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$MD_ONLY" = false ] || [ -z "$CHANGED_FILES" ]; then
|
||||
if [ "$IMPORTANT_FILE_CHANGED" = true ]; then
|
||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "should_run=false" >> $GITHUB_OUTPUT
|
||||
|
Loading…
x
Reference in New Issue
Block a user