schedule #585
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: schedule | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
push: | |
branches: [master, main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
TZ: Asia/Shanghai | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Set node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16.x | |
- name: Update image | |
run: | | |
git config --local user.email "bot@github.com" | |
git config --local user.name "github" | |
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git pull --rebase | |
cd ./script | |
npx pnpm install --no-frozen-lockfile | |
npx pnpm run test | |
cd ../ | |
git add . | |
git commit -m "update by github action" --allow-empty | |
git push -f |