From 44ff5946324d4cff1389f41bb73a5aaf49853527 Mon Sep 17 00:00:00 2001 From: wds Date: Tue, 21 Oct 2025 22:00:57 +0800 Subject: [PATCH] feat: sync to gitea (gitea action push to github have some questionc --- .github/workflows/push.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/push.yaml diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml new file mode 100644 index 0000000..adbfdde --- /dev/null +++ b/.github/workflows/push.yaml @@ -0,0 +1,32 @@ +name: Sync to Gitea + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + sync-to-gitea: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch all history for all branches and tags + + - name: Set up Git + run: | + git config --global user.name "GitHub Action wds" + git config --global user.email "wdsnpshy@163.com" + + - name: Add Gitea remote with authentication + run: | + git remote add gitea https://${{ secrets.GITEA_USER }}:${{ secrets.GITEA_PASSWORD }}@cloud-home.dxh-wds.top:20110/w/AutoTerminal.git + + - name: Push all branches to Gitea + run: | + git push gitea main --force + + - name: Push tags to Gitea + run: | + git push gitea --tags --force