From 769307dd4e6b48372daaf566420a70db619e1926 Mon Sep 17 00:00:00 2001 From: Ryananana <36809659+Ryananana@users.noreply.github.com> Date: Mon, 20 May 2024 17:07:07 +0800 Subject: [PATCH] Update and rename main.yml to fetch.yml Signed-off-by: Ryananana <36809659+Ryananana@users.noreply.github.com> --- .github/workflows/fetch.yml | 22 ++++++++++++++++++++++ .github/workflows/main.yml | 19 ------------------- 2 files changed, 22 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/fetch.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/fetch.yml b/.github/workflows/fetch.yml new file mode 100644 index 00000000..e7caf1a8 --- /dev/null +++ b/.github/workflows/fetch.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index d3af15a7..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -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