Merge pull request #172 from RikudouPatrickstar/master
自动检查并刷新clash内核版本记录信息,以及自动清理旧的Workflows
This commit is contained in:
18
.github/workflows/bin_update.yml
vendored
18
.github/workflows/bin_update.yml
vendored
@@ -69,9 +69,23 @@ jobs:
|
|||||||
sed -i '/GeoIP_v*/'d version
|
sed -i '/GeoIP_v*/'d version
|
||||||
echo GeoIP_v=`date '+%Y%m%d'` >> version
|
echo GeoIP_v=`date '+%Y%m%d'` >> version
|
||||||
echo IP数据库及根证书文件更新完成!
|
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
|
- name: Commit and push
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "juewuy@gmail.com" && git config --global user.name "Bot"
|
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
|
git push
|
||||||
|
|
||||||
|
- name: Cleanup Workflow
|
||||||
|
uses: Mattraks/delete-workflow-runs@main
|
||||||
|
with:
|
||||||
|
retain_days: 1
|
||||||
|
keep_minimum_runs: 3
|
||||||
|
|||||||
Reference in New Issue
Block a user