




执行信息如下,设置好点击右上角的 Commit changes... 即可完成!如需修改执行频率可修改0 */6 * * *为其它,本例为6小时提交一次代码。
name: main
on:
push:
branches:
- main
schedule:
- cron: "0 */6 * * *"
permissions:
contents: write
jobs:
autogreen:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: stick
run: |
date > date.txt
git config --local user.name "自己的github用户名(重要)"
git config --local user.email "自己的github邮箱(重要)"
git add date.txt
git commit --allow-empty -m "updated txt"
git push
