add time china #1434
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: add time china | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '12 */8 * * *' | |
watch: | |
types: [started] | |
jobs: | |
Task: | |
runs-on: ubuntu-latest | |
if: github.event.repository.owner.id == github.event.sender.id # 自己点的 start | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: add time #Api调用 | |
run: | | |
sudo timedatectl set-timezone "Asia/Shanghai" | |
echo `date +"%Y-%m-%d %H:%M:%S"` begin > time.log | |
- name: Commit #上传新的refresh_token到仓库 | |
run: | | |
git config --global user.email [email protected] | |
git config --global user.name valetzx | |
git add . | |
git commit -m "Update new time at $(date +'%Y-%m-%d %H:%M:%S') " -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |