gitee-sync #36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: gitee-sync | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| sync: | |
| name: gitee-sync | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| if: github.actor != 'dependabot[bot]' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Configure SSH key for Gitee | |
| uses: webfactory/ssh-agent@v0.9.0 | |
| with: | |
| ssh-private-key: ${{ secrets.GITEE_PI_SSH }} | |
| - name: Verify Gitee SSH connectivity | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mkdir -p ~/.ssh | |
| ssh-keyscan -H gitee.com >> ~/.ssh/known_hosts | |
| ssh -o BatchMode=yes -T git@gitee.com || true | |
| git ls-remote git@gitee.com:agoraio-community/API-Examples.git HEAD | |
| - name: Gitee sync repo | |
| uses: xgfd3/hub-mirror-action@v1.4 | |
| with: | |
| src: github/Shengwang-Community | |
| dst: gitee/agoraio-community | |
| white_list: "API-Examples" | |
| static_list: "API-Examples" | |
| cache_path: "./cache" | |
| dst_key: ${{ secrets.GITEE_PI_SSH }} | |
| dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }} | |
| force_update: true | |
| account_type: org | |
| github_ref: refs/heads/main |