geoip和geosite更换为增强版

This commit is contained in:
wyx2685 2023-12-15 03:31:50 +09:00
parent 5aef9cf0de
commit a25c3d2759
No known key found for this signature in database
GPG Key ID: 8827A30FF1DB1379

View File

@ -142,16 +142,13 @@ jobs:
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
cp ${GITHUB_WORKSPACE}/example/*.json ./build_assets/
LIST=('geoip geoip geoip' 'domain-list-community dlc geosite')
LIST=('geoip' 'geosite')
for i in "${LIST[@]}"
do
INFO=($(echo $i | awk 'BEGIN{FS=" ";OFS=" "} {print $1,$2,$3}'))
FILE_NAME="${INFO[2]}.dat"
echo -e "Downloading ${FILE_NAME}..."
curl -L "https://github.com/v2fly/${INFO[0]}/releases/latest/download/${INFO[1]}.dat" -o ./build_assets/${FILE_NAME}
echo -e "Verifying HASH key..."
HASH="$(curl -sL "https://github.com/v2fly/${INFO[0]}/releases/latest/download/${INFO[1]}.dat.sha256sum" | awk -F ' ' '{print $1}')"
[ "$(sha256sum "./build_assets/${FILE_NAME}" | awk -F ' ' '{print $1}')" == "${HASH}" ] || { echo -e "The HASH key of ${FILE_NAME} does not match cloud one."; exit 1; }
DOWNLOAD_URL="https://raw.githubusercontent.com/Loyalsoldier/v2ray-rules-dat/release/${i}.dat"
FILE_NAME="${i}.dat"
echo -e "Downloading ${DOWNLOAD_URL}..."
curl -L "${DOWNLOAD_URL}" -o ./build_assets/${FILE_NAME}
done
- name: Create ZIP archive
shell: bash