From da0a704d99d3ed2826413ee4daa04d83516d6fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=20=D0=A8?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=BB=D0=B8=D0=BD=D0=B3?= Date: Sat, 9 Mar 2024 13:48:08 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20.gitea/workflows/automerge-with-core.yaml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/automerge-with-core.yaml | 34 ++++++++--------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/automerge-with-core.yaml b/.gitea/workflows/automerge-with-core.yaml index a195e97..b4b4370 100644 --- a/.gitea/workflows/automerge-with-core.yaml +++ b/.gitea/workflows/automerge-with-core.yaml @@ -1,5 +1,9 @@ name: Merge core/template-android-project to this repo +env: + CORE_URL: "https://git.sicampus.ru/core/template-android-project.git" + TOKEN: ${{ secrets.PUSH_TOKEN }} + run-name: Merge core/template-android-project to ${{ gitea.repository }} on: push: @@ -12,26 +16,12 @@ jobs: runs-on: ubuntu-latest steps: - run: echo "Merge core/template-android-project to ${{ gitea.repository }}" - - run: | - git config --global credential.helper '!f() { sleep 1; echo "username=vladimir-shperling=${{ secrets.PUSH_TOKEN }}"; }; f' - git config --global user.email "test@bot.com" - git config --global user.name "Bot" - - run: git clone https://sicampus.ru/gitea/${{ gitea.repository }} /repo - - run: | - cd /repo - git remote add upstream https://sicampus.ru/gitea/core/template-android-project.git - - run: | - cd /repo - git fetch upstream - - run: | - cd /repo - git rebase upstream/main -s ours - - run: | - cd /repo - git push --force - - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}." - - run: echo "🍏 This job's status is ${{ job.status }}." - - run: echo "I'm merge correct" + - name: Check out repository code + uses: actions/checkout@v4 + - name: Sync repos + uses: dabreadman/sync-upstream-repo@v1.3.0 + with: + upstream_repo: ${{ env.CORE_REPO }} + token: ${{ env.TOKEN }} + spawn_logs: true \ No newline at end of file