-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c54b636
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.