每周删除提交记录 #162
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: 每周删除提交记录 | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 2 * * 1' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: 删除提交记录 | |
run: | | |
git config --global user.name "ermaozi" | |
git config --global user.email [email protected] | |
git checkout --orphan new_branch | |
git commit -m "初始化仓库" | |
git branch -D main | |
git branch -m main | |
git push -f origin main |