@@ -29,39 +29,40 @@ jobs:
2929 needs : check-repository
3030 if : needs.check-repository.outputs.should_run == 'true'
3131 runs-on : ubuntu-latest
32-
32+
3333 steps :
3434 - name : Check Out Repository
3535 uses : actions/checkout@v3
36-
36+
3737 - name : Download JSON schema files from MaaFramework
3838 run : |
3939 echo "Current Date and Time (UTC): $(date -u '+%Y-%m-%d %H:%M:%S')"
40-
40+
4141 # 确保目标目录存在
4242 mkdir -p deps/tools
43-
43+
4444 # 下载四个JSON schema文件
4545 curl -s -o deps/tools/interface.schema.json https://raw.githubusercontent.com/MaaXYZ/MaaFramework/main/tools/interface.schema.json || echo "Failed to download interface.schema.json"
4646 curl -s -o deps/tools/interface_config.schema.json https://raw.githubusercontent.com/MaaXYZ/MaaFramework/main/tools/interface_config.schema.json || echo "Failed to download interface_config.schema.json"
47+ curl -s -o deps/tools/interface_import.schema.json https://raw.githubusercontent.com/MaaXYZ/MaaFramework/main/tools/interface_import.schema.json || echo "Failed to download interface_import.schema.json"
4748 curl -s -o deps/tools/pipeline.schema.json https://raw.githubusercontent.com/MaaXYZ/MaaFramework/main/tools/pipeline.schema.json || echo "Failed to download pipeline.schema.json"
48-
49+
4950 # 检查文件是否成功下载
5051 echo "Checking downloaded files:"
5152 ls -la deps/tools/*.schema.json
52-
53+
5354 - name : Check for changes with git status
5455 id : check_status
5556 run : |
5657 # 确保git能看到未跟踪的文件
5758 git add -N deps/tools/
58-
59+
5960 # 检查是否有任何更改(修改、新增、删除)
6061 if [[ -n "$(git status --porcelain deps/tools/*.schema.json)" ]]; then
6162 echo "Changes detected in JSON schema files"
6263 git status --porcelain deps/tools/*.schema.json
6364 echo "changes_detected=true" >> $GITHUB_OUTPUT
64-
65+
6566 # 检查哪些文件发生了变化
6667 if [[ -n "$(git status --porcelain deps/tools/interface.schema.json)" ]]; then
6768 echo "interface_changed=true" >> $GITHUB_OUTPUT
7374 else
7475 echo "interface_config_changed=false" >> $GITHUB_OUTPUT
7576 fi
77+ if [[ -n "$(git status --porcelain deps/tools/interface_import.schema.json)" ]]; then
78+ echo "interface_import_changed=true" >> $GITHUB_OUTPUT
79+ else
80+ echo "interface_import_changed=false" >> $GITHUB_OUTPUT
81+ fi
7682 if [[ -n "$(git status --porcelain deps/tools/pipeline.schema.json)" ]]; then
7783 echo "pipeline_changed=true" >> $GITHUB_OUTPUT
7884 else
8389 echo "changes_detected=false" >> $GITHUB_OUTPUT
8490 echo "interface_changed=false" >> $GITHUB_OUTPUT
8591 echo "interface_config_changed=false" >> $GITHUB_OUTPUT
92+ echo "interface_import_changed=false" >> $GITHUB_OUTPUT
8693 echo "pipeline_changed=false" >> $GITHUB_OUTPUT
8794 fi
88-
95+
8996 - name : Commit and Push Changes
9097 id : commit_changes
9198 if : steps.check_status.outputs.changes_detected == 'true'
@@ -106,6 +113,9 @@ jobs:
106113 if [[ "${{ steps.check_status.outputs.interface_config_changed }}" == "true" ]]; then
107114 changed_files+="interface_config "
108115 fi
116+ if [[ "${{ steps.check_status.outputs.interface_import_changed }}" == "true" ]]; then
117+ changed_files+="interface_import "
118+ fi
109119 if [[ "${{ steps.check_status.outputs.pipeline_changed }}" == "true" ]]; then
110120 changed_files+="pipeline "
111121 fi
0 commit comments