Skip to content

gitee-sync

gitee-sync #36

Workflow file for this run

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