forked from soybeanjs/soybean-admin
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: sync-to-gitee | ||
on: | ||
push: | ||
branches: [ "fs" ] | ||
pull_request: | ||
branches: [ "fs" ] | ||
# schedule: | ||
# - # 国际时间 19:17 执行,北京时间3:17 ↙↙↙ 改成你想要每天自动执行的时间 | ||
# - cron: '17 19 * * *' | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout work repo # 1. 检出当前仓库(certd-sync-work) | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set git user # 2. 给git命令设置用户名和邮箱,↙↙↙ 改成你的name和email | ||
run: | | ||
git config --global user.name "xiaojunnuo" | ||
git config --global user.email "[email protected]" | ||
- name: Set git token # 3. 给git命令设置token,用于push到目标仓库 | ||
uses: de-vri-es/setup-git-credentials@v2 | ||
with: | ||
credentials: https://${{secrets.PUSH_TOKEN_GITEE}}@gitee.com | ||
|
||
- name: push to gitee # 4. 执行同步 | ||
run: | | ||
git remote add upstream https://gitee.com/fast-crud/fs-in-soybean-admin | ||
git push --set-upstream upstream fs | ||