.github/workflows/pull-from-gitee.yml #12
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
name: Pull from Gitee | |
on: | |
schedule: | |
- cron: '0 0 * * *' # 每天午夜(UTC时间)运行 | |
workflow_dispatch: # 添加手动触发事件 | |
jobs: | |
pull: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Git identity | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Malus" | |
- name: Pull from Gitee | |
run: | | |
git remote add gitee https://[email protected]/Pridejoy/MalusAdmin.git | |
git fetch gitee master | |
git reset --hard gitee/master | |
git push origin master --force | |
env: | |
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }} |