From f7dbd429a55a3ebabee832bd854b7dd7eedc2068 Mon Sep 17 00:00:00 2001 From: giles Date: Sun, 22 Oct 2023 01:27:58 +0100 Subject: [PATCH] kkkkkkkkkkkk --- .gitea/workflows/convert-to-yml.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/convert-to-yml.yml b/.gitea/workflows/convert-to-yml.yml index 2d36dae..dc924be 100644 --- a/.gitea/workflows/convert-to-yml.yml +++ b/.gitea/workflows/convert-to-yml.yml @@ -18,10 +18,17 @@ jobs: path: '.' - name: get production branch name run: | - pwd firstString=${{ github.ref_name }} secondString="develop-" echo ::set-env name=PRODUCTION_BRANCH::${firstString/format-/"$secondString"} + - name: clone + run: | + git clone github.repositoryUrl ../cloned + mv ../cloned/.git .. + rm -rf ../cloned + cp -r . ../cloned + rm -rf ../cloned/.git + mv ../.git ../cloned - name: GIT commit and push all changed files env: CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts @@ -30,14 +37,14 @@ jobs: git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" git config --global user.email "username@users.noreply.github.com" git config pull.rebase false - git checkout -b ${{ env.PRODUCTION_BRANCH }} - git add -A - git commit -a -m "${{ env.CI_COMMIT_MESSAGE }} xml files converted to yml" - git push -f origin HEAD:${{ env.PRODUCTION_BRANCH }} - git fetch - git merge origin/master --allow-unrelated-histories --strategy-option=ours - git push origin HEAD:${{ env.PRODUCTION_BRANCH }} + git -C ../cloned checkout -b ${{ env.PRODUCTION_BRANCH }} + git -C ../cloned add -A + git -C ../cloned commit -a -m "${{ env.CI_COMMIT_MESSAGE }} xml files converted to yml" + git -C ../cloned push -f origin HEAD:${{ env.PRODUCTION_BRANCH }} - name: make pull request + #git fetch + # git merge origin/master --allow-unrelated-histories --strategy-option=ours + # git push origin HEAD:${{ env.PRODUCTION_BRANCH }} run: | curl https://dl.gitea.com/tea/0.9.2/tea-0.9.2-linux-386 --output tea chmod +x ./tea