From f85e23536c9cee83f3d63124f4af5e28bed63f51 Mon Sep 17 00:00:00 2001 From: "firedcto@gmail.com" Date: Thu, 3 Oct 2024 17:59:27 +0800 Subject: [PATCH] add sync repo action --- .github/workflows/sync_repos.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/sync_repos.yml diff --git a/.github/workflows/sync_repos.yml b/.github/workflows/sync_repos.yml new file mode 100644 index 0000000..78b9119 --- /dev/null +++ b/.github/workflows/sync_repos.yml @@ -0,0 +1,29 @@ +name: sync repos + +on: + push: + branches: + - main + +jobs: + clone-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Clone GitHub repository + run: | + git clone --mirror https://github.com/ok-oldking/ok-wuthering-waves.git + cd ok-wuthering-waves.git + + - name: Set up Git credentials + run: | + git config --global user.name "${{ secrets.CODING_USERNAME }}" + git config --global user.password "${{ secrets.CODING_PASSWORD }}" + + - name: Push to Coding.net + run: | + git remote add coding https://e.coding.net/g-frfh1513/ok-wuthering-waves/ok-wuthering-waves.git + git push --mirror coding --force