mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-10-10 04:53:09 +08:00
2bdf16d596
* chore(deps): pin dependencies * chore: exclude docker from renovate --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yinan Qin <elysia-best@simplelinux.cn.eu.org> Co-authored-by: Pikachu Ren <40362270+PIKACHUIM@users.noreply.github.com>
39 lines
995 B
YAML
39 lines
995 B
YAML
name: Sync to Gitee
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
name: Sync GitHub to Gitee
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup SSH
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.GITEE_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
ssh-keyscan gitee.com >> ~/.ssh/known_hosts
|
|
|
|
- name: Create single commit and push
|
|
run: |
|
|
git config user.name "GitHub Actions"
|
|
git config user.email "actions@github.com"
|
|
|
|
# Create a new branch
|
|
git checkout --orphan new-main
|
|
git add .
|
|
git commit -m "Sync from GitHub: $(date)"
|
|
|
|
# Add Gitee remote and force push
|
|
git remote add gitee ${{ vars.GITEE_REPO_URL }}
|
|
git push --force gitee new-main:main
|