From c6884a349ac54f1e3af169ffd594b16b089b7c0a Mon Sep 17 00:00:00 2001 From: NianBroken Date: Wed, 21 Feb 2024 23:46:39 +0800 Subject: [PATCH] add --- .github/workflows/main.yml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b7fcadd..0441c4e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -137,12 +137,6 @@ jobs: # 使用pip安装项目的依赖项 pip install requests rsa pyquery - - name: Configure Git - run: | - # 配置Git用户信息 - git config --global user.email "actions@github.com" - git config --global user.name "GitHub Actions" - - name: Run main program env: FORCE_PUSH_MESSAGE: ${{ github.event.inputs.force_push_message }} @@ -235,16 +229,8 @@ jobs: - name: Checkout Repository uses: actions/checkout@main - # 创建 ThirtyMinutesAgo 分支并推送到远程 - - name: Create ThirtyMinutesAgo Branch + # 成备份main分支到ThirtyMinutesAgo分支 + - name: Backup Main to ThirtyMinutesAgo run: | - git checkout -b ThirtyMinutesAgo || git checkout ThirtyMinutesAgo - git push -f origin ThirtyMinutesAgo - - # 强制将 main 分支内容复制到 ThirtyMinutesAgo 分支并推送到远程 - - name: Force Push Main to ThirtyMinutesAgo - run: | - git fetch origin - git checkout main - git reset --hard origin/main - git push -f origin main:ThirtyMinutesAgo + git checkout -b OldMain|| git checkout OldMain + git push -f origin ThirtyMinutesAgo \ No newline at end of file