自动检查并刷新clash内核版本记录信息

This commit is contained in:
RikudouPatrickstar 2022-05-24 12:51:17 +08:00
parent b301548c8c
commit 23d04efc51

View File

@ -69,11 +69,19 @@ jobs:
sed -i '/GeoIP_v*/'d version
echo GeoIP_v=`date '+%Y%m%d'` >> version
echo IP数据库及根证书文件更新完成
- name: Update Core Version Info
run: |
chmod -R +x bin/clash*/
sed -i "s/meta_v=.*/meta_v=$(./bin/clash.meta/clash-linux-amd64 -v 2>/dev/null | sed 's/ linux.*//;s/.* //')/" bin/version
sed -i "s/clashnet_v=.*/clashnet_v=$(./bin/clash.net/clash-linux-amd64 -v 2>/dev/null | sed 's/ linux.*//;s/.* //')/" bin/version
sed -i "s/clash_v=.*/clash_v=$(./bin/clash/clash-linux-amd64 -v 2>/dev/null | sed 's/ linux.*//;s/.* //')/" bin/version
sed -i "s/clashpre_v=.*/clashpre_v=$(./bin/clashpre/clash-linux-amd64 -v 2>/dev/null | sed 's/ linux.*//;s/.* //')/" bin/version
- name: Commit and push
run: |
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
git add . && git commit -m "自动同步最新版本Dashboard面板、数据库及根证书文件" || exit 0
git add . && git commit -m "自动更新最新Dashboard、地址库、根证书以及内核版本信息" || exit 0
git push
- name: Cleanup Workflow