Update README.md #1991
This file contains hidden or 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: Update README.md | |
| on: | |
| push: | |
| # 只有推送到 main 分支才会触发 | |
| branches: | |
| - main | |
| schedule: | |
| # 每天早上五点,自动触发 | |
| - cron: "0 5 * * *" | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v2 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v2-beta | |
| with: | |
| node-version: "14" | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Generate github profile | |
| run: |- | |
| yarn generate | |
| cat README.md | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| WAKATIME_TOKEN: ${{ secrets.WAKATIME_TOKEN }} | |
| - name: Commit and push if changed | |
| run: |- | |
| git diff | |
| git config --global user.email "blackcater2015@gmail.com" | |
| git config --global user.name "blackcater" | |
| git pull | |
| git add -A | |
| git commit -m "Daily: update README.md" || exit 0 | |
| git push |