From f6aef9ba07d95d65dc4a5faaf28a2a65c0b3d756 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: Sun, 3 Mar 2024 18:54:13 +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 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/automerge-with-core.yaml b/.gitea/workflows/automerge-with-core.yaml index 80caa21..9e01eb1 100644 --- a/.gitea/workflows/automerge-with-core.yaml +++ b/.gitea/workflows/automerge-with-core.yaml @@ -1,4 +1,6 @@ name: Merge core/template-android-project to this repo +env: + TOKEN: ${{ secrets.PUSH_TOKEN }} run-name: Merge core/template-android-project to ${{ gitea.repository }} on: @@ -13,10 +15,21 @@ jobs: steps: - run: echo "Merge core/template-android-project to ${{ gitea.repository }}" - run: | + git config --global credential.helper '!f() { sleep 1; echo "username=vladimir-shperling=${{ TOKEN }}"; }; f' + echo "Cloning Core" + git clone https://sicampus.ru/gitea/core/template-android-project /core + echo "Cloning Repo" git clone https://sicampus.ru/gitea/${{ gitea.repository }} /repo cd /repo - git merge --allow-unrelated-histories https://sicampus.ru/gitea/core/template-android-project/${{ gitea.ref }} - git log + echo "Cloning Remote core" + git remote add core /core + echo "Cloning Fetch core" + git fetch core + echo "Cloning Merge core" + git merge --allow-unrelated-histories core/main + echo "Cloning Push core" + git push --force + echo "OK" - 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 }}."