Skip to content

Commit

Permalink
2024-10-06 00:13:49 CST
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 5, 2024
0 parents commit c54b636
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/Update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Update

on:
push:
schedule:
- cron: 0 16 * * *

env:
TZ: Asia/Shanghai

jobs:
Update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: GetTime
run: echo "GET_TIME=$(date +'%Y-%m-%d %H:%M:%S CST')" >> $GITHUB_ENV

- name: Update
run: |
rm -f sing-box
SING_BOX_LATEST=$(curl -s https://api.github.com/repos/SagerNet/sing-box/releases/latest \
| grep tag_name \
| cut -d ":" -f2 \
| sed 's/\"//g;s/\,//g;s/\ //g;s/v//')
curl -LOf# https://github.com/SagerNet/sing-box/releases/download/v${SING_BOX_LATEST}/sing-box-${SING_BOX_LATEST}-linux-amd64v3.tar.gz
tar -zxvf sing-box-${SING_BOX_LATEST}-linux-amd64v3.tar.gz sing-box-${SING_BOX_LATEST}-linux-amd64v3/sing-box
rm -f sing-box-${SING_BOX_LATEST}-linux-amd64v3.tar.gz
mv sing-box-${SING_BOX_LATEST}-linux-amd64v3/sing-box sing-box
rm -rf sing-box-${SING_BOX_LATEST}-linux-amd64v3
echo "Auto Update Sing-Box(${SING_BOX_LATEST}) in ${GET_TIME}" > README.md
- name: Clean
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git checkout --orphan latest_branch
git add -A
git commit -am "${GET_TIME}"
git branch -D Files
git branch -m Files
- name: Push
run: git push -f origin Files
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Auto Update Sing-Box(1.9.6) in 2024-10-06 00:13:49 CST
Binary file added sing-box
Binary file not shown.

0 comments on commit c54b636

Please sign in to comment.