Skip to content

GitHub Self-Updating Repository Demo #742

GitHub Self-Updating Repository Demo

GitHub Self-Updating Repository Demo #742

Workflow file for this run

name: GitHub Self-Updating Repository Demo
on:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
schedule:
# The shortest interval you can run scheduled workflows is once every 5 minutes.
# Note: The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs.
# High load times include the start of every hour.
# To decrease the chance of delay, schedule your workflow to run at a different time of the hour.
# Every 5 minutes.
# - cron: '*/5 * * * *'
# At the beginning of every day.
- cron: "0 0 * * *"
# on: [push]
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
# https://github.com/actions/checkout/tree/v3.0.2
uses: actions/checkout@v3
- name: Modify date and time
run: |
date > README.md
cat README.md
- name: Push to repository
run: |
git config --global user.name "Lei Mao"
git config --global user.email "[email protected]"
now=$(date)
git add -A
git commit -m "Auto Push on $now"
git push