Skip to content

Merge pull request #105 from cosmo-wander-ai/codex/rockchip-build-env #154

Merge pull request #105 from cosmo-wander-ai/codex/rockchip-build-env

Merge pull request #105 from cosmo-wander-ai/codex/rockchip-build-env #154

name: Mirror to Gitee
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: mirror-gitee
cancel-in-progress: true
jobs:
mirror:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
persist-credentials: false
- name: Setup SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.GITEE_PRIVATE_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
for i in 1 2 3; do
ssh-keyscan -t ed25519 gitee.com >> ~/.ssh/known_hosts && break
echo "ssh-keyscan attempt $i failed, retrying in 2s..."
sleep 2
done
# Fail the step if known_hosts is empty (all retries exhausted)
test -s ~/.ssh/known_hosts || { echo "ssh-keyscan failed after 3 attempts"; exit 1; }
- name: Push to Gitee
run: |
git remote add gitee git@gitee.com:cosmo-wander-ai/cosmo-edge.git || true
git push gitee main --force --tags