Update and rename main.yml to fetch.yml

Signed-off-by: Ryananana <36809659+Ryananana@users.noreply.github.com>
This commit is contained in:
Ryananana 2024-05-20 17:07:07 +08:00 committed by GitHub
parent 5a13210846
commit 769307dd4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 22 additions and 19 deletions

22
.github/workflows/fetch.yml vendored Normal file
View File

@ -0,0 +1,22 @@
# .github/workflows/fetch.yml
name: Merge upstream branches
on:
schedule:
- cron: '* * * * *'
workflow_dispatch:
jobs:
merge:
runs-on: ubuntu-latest
steps:
- name: Merge upstream
run: |
git config --global user.name 'Ryananana'
git config --global user.email '36809659+Ryananana@users.noreply.github.com'
git config --global credential.helper store
git clone https://${{ secrets.PERSONAL_TOKEN }}@github.com/Ryananana/sing-box.git tmp
cd tmp
git remote add upstream https://github.com/SagerNet/sing-box.git
git fetch upstream
git merge upstream/dev-next
git push origin dev-next

View File

@ -1,19 +0,0 @@
name: Sync Fork
on:
schedule:
- cron: '*/30 * * * *' # every 30 minutes
workflow_dispatch: # on button click
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: tgymnich/fork-sync@v1.8
with:
token: ${{ secrets.PERSONAL_TOKEN }}
owner: SagerNet
base: dev-next
head: dev-next