更新 .gitea/workflows/sync_raw_file.yml
All checks were successful
SyncRawFile / sync_files (push) Successful in 28s
All checks were successful
SyncRawFile / sync_files (push) Successful in 28s
This commit is contained in:
@@ -16,11 +16,12 @@ jobs:
|
|||||||
- name: Define file types and download
|
- name: Define file types and download
|
||||||
run: |
|
run: |
|
||||||
# 定义文件目录和平台类型列表
|
# 定义文件目录和平台类型列表
|
||||||
directories=("Lan" "Apple" "Steam" "SteamCN" "Xbox" "OpenAI" "Gemini" "Claude" "China" "Proxy" "TikTok")
|
directories=("Lan" "Apple" "Steam" "SteamCN" "Xbox" "OpenAI" "Gemini" "Claude" "China" "Proxy")
|
||||||
platform_types=("Surge" "Clash" "Loon" "QuantumultX" "Shadowrocket")
|
platform_types=("Surge" "Clash" "Loon" "QuantumultX" "Shadowrocket")
|
||||||
|
|
||||||
# 统一将所有文件扩展名设置为 list
|
# 平台类型和文件扩展名的映射
|
||||||
filetype="list"
|
declare -A type_mapping
|
||||||
|
type_mapping=(["Surge"]="list" ["Clash"]="yaml" ["Loon"]="list" ["QuantumultX"]="list" ["Shadowrocket"]="list")
|
||||||
|
|
||||||
# 循环遍历每个平台
|
# 循环遍历每个平台
|
||||||
for platform_type in "${platform_types[@]}"; do
|
for platform_type in "${platform_types[@]}"; do
|
||||||
@@ -30,6 +31,9 @@ jobs:
|
|||||||
# 创建目录(如果不存在的话)
|
# 创建目录(如果不存在的话)
|
||||||
mkdir -p "$save_dir"
|
mkdir -p "$save_dir"
|
||||||
|
|
||||||
|
# 获取当前平台类型的扩展名
|
||||||
|
filetype=${type_mapping[$platform_type]}
|
||||||
|
|
||||||
# 循环遍历每个目录,下载对应平台下的文件
|
# 循环遍历每个目录,下载对应平台下的文件
|
||||||
for directory in "${directories[@]}"; do
|
for directory in "${directories[@]}"; do
|
||||||
# 构建文件 URL
|
# 构建文件 URL
|
||||||
|
|||||||
Reference in New Issue
Block a user