From 851b76bff9fbc14bba6b4e0b06873c0bfa8fb309 Mon Sep 17 00:00:00 2001 From: ZeYi Lin <944270057@qq.com> Date: Thu, 12 Sep 2024 01:06:15 +0800 Subject: [PATCH] chore: gitee action --- .github/workflows/sync-to-gitee.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/sync-to-gitee.yml diff --git a/.github/workflows/sync-to-gitee.yml b/.github/workflows/sync-to-gitee.yml new file mode 100644 index 00000000..a9350fe8 --- /dev/null +++ b/.github/workflows/sync-to-gitee.yml @@ -0,0 +1,25 @@ +name: Sync to Gitee + +on: + push: + branches: + - master # 或者你想要同步的其他分支 + +jobs: + sync: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Push to Gitee + env: + GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }} + GITEE_USERNAME: ${{ secrets.GITEE_USERNAME }} + GITEE_EMAIL: ${{ secrets.GITEE_EMAIL }} + run: | + git config --global user.name ${GITEE_USERNAME} + git config --global user.email ${GITEE_EMAIL} + git remote add gitee https://${GITEE_USERNAME}:${GITEE_TOKEN}@gitee.com/${GITEE_USERNAME}/HivisionIDPhotos.git + git push -f gitee master:master