From 0dc063e73672126b33b265cc0848923f94abda8b Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Fri, 8 Aug 2025 09:03:44 +0200 Subject: [PATCH] Update push-to-gitea.yml --- .github/workflows/push-to-gitea.yml | 36 ++++++++++++++++++----------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/push-to-gitea.yml b/.github/workflows/push-to-gitea.yml index 33118f07..3df681d1 100644 --- a/.github/workflows/push-to-gitea.yml +++ b/.github/workflows/push-to-gitea.yml @@ -11,17 +11,25 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout source repo - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Push to Gitea - run: | - git config --global user.name "Push From Github" - git config --global user.email "actions@github.com" - git remote add gitea https://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git - git push gitea --force-with-lease gitea --all - env: - GITEA_USER: ${{ secrets.GITEA_USERNAME }} - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + - name: Checkout source repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Add Gitea remote + run: git remote add gitea https://$GITEA_USER:$GITEA_TOKEN@git.community-scripts.org/community-scripts/ProxmoxVED.git + env: + GITEA_USER: ${{ secrets.GITEA_USERNAME }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + - name: Pull Gitea changes + run: | + git fetch gitea + git rebase gitea/main + env: + GITEA_USER: ${{ secrets.GITEA_USERNAME }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + + - name: Push to Gitea + run: git push gitea --all + env: + GITEA_USER: ${{ secrets.GITEA_USERNAME }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}