Commit 38daec85fd9f07ef265e841f459cdbc81f0ada8c
1 parent
09dae69e
chore: add comments for gitee-mirror.yml
Showing
1 changed file
with
13 additions
and
2 deletions
.github/workflows/gitee-mirror.yml
| 1 | -# This is a basic workflow to help you get started with Actions | 1 | +# 使用 GitHub Action 来解决手动同步到 Gitee 的问题 |
| 2 | +# 效果:github repo 代码更新之后,会自动同步至 gitee | ||
| 3 | +# 使用到的 GitHub Action:https://github.com/Yikun/hub-mirror-action | ||
| 4 | + | ||
| 5 | +This is a basic workflow to help you get started with Actions | ||
| 2 | 6 | ||
| 3 | name: gitee-mirror<sync2gitee.com> | 7 | name: gitee-mirror<sync2gitee.com> |
| 4 | 8 | ||
| @@ -6,7 +10,7 @@ name: gitee-mirror<sync2gitee.com> | @@ -6,7 +10,7 @@ name: gitee-mirror<sync2gitee.com> | ||
| 6 | # events but only for the master branch | 10 | # events but only for the master branch |
| 7 | on: | 11 | on: |
| 8 | push: | 12 | push: |
| 9 | - branches: | 13 | + branches: |
| 10 | - '*' | 14 | - '*' |
| 11 | 15 | ||
| 12 | jobs: | 16 | jobs: |
| @@ -22,9 +26,16 @@ jobs: | @@ -22,9 +26,16 @@ jobs: | ||
| 22 | with: | 26 | with: |
| 23 | src: github/ly525 | 27 | src: github/ly525 |
| 24 | dst: gitee/ly525 | 28 | dst: gitee/ly525 |
| 29 | + # 这里请填写与gitee上公钥匹配的的 ssh private key,参见:https://gitee.com/profile/sshkeys | ||
| 30 | + # 填写地址:https://github.com/ly525/luban-h5/settings/secrets | ||
| 25 | dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} | 31 | dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} |
| 32 | + # 这里请填写 gitee的令牌,参见:https://gitee.com/profile/personal_access_tokens | ||
| 33 | + # 填写地址:https://github.com/ly525/luban-h5/settings/secrets | ||
| 26 | dst_token: ${{ secrets.GITEE_TOKEN }} | 34 | dst_token: ${{ secrets.GITEE_TOKEN }} |
| 35 | + # 项目同步白名单,可以选择填写多个,以英文逗号分割 | ||
| 27 | static_list: "luban-h5" | 36 | static_list: "luban-h5" |
| 37 | + # 是否强制同步 | ||
| 28 | force_update: true | 38 | force_update: true |
| 39 | + # 账号类型:对 luban-h5 而言是 user,因为是个人项目;如果是企业项目,请填写 org,因为是组织下的项目 | ||
| 29 | account_type: user | 40 | account_type: user |
| 30 | clone_style: ssh | 41 | clone_style: ssh |