-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (31 loc) · 1010 Bytes
/
update-readme.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Update README
on:
push:
branches:
- main
schedule:
# At the beginning of every day.
- cron: "0 0 * * *"
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
- name: Update README
run: |
python run.py
- name: Push to repository
run: |
git config --global user.name "John Bampton"
git config --global user.email "jbampton@users.noreply.github.com"
now=$(date)
index=$(shuf -i 0-4 -n 1)
array=(💚 💙 🖤 💜 🧡)
git add -A
git diff-index --quiet HEAD || git commit -m "${array[index]} Auto Push on $now"
git push