Skip to content

Commit

Permalink
Init project.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jul 10, 2020
0 parents commit 829e830
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Mirror"

on:
push:
branches:
- master
schedule:
- cron: '0 20 * * *'

jobs:
run:
name: Sync to Gitee
runs-on: ubuntu-latest
steps:
- name: Manually mirror
run: |
mirror() {
git clone "https://github.com/$1/$2"
cd "$2"
git remote add gitee "https://jaywcjlove:${{ secrets.GITEE_TOKEN }}@gitee.com/jaywcjlove/$2.git"
git remote set-head origin -d
git push gitee --prune +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/*
cd ..
}
mirror jaywcjlove github-rank
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Auto Gitee Mirror

Mirror

Use GitHub Actions to sync from GitHub to Gitee

0 comments on commit 829e830

Please sign in to comment.