-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 964 Bytes
/
builder.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
34
35
36
37
38
name: Builder
on:
push:
branches:
- main
jobs:
generate_readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run Python script
run: |
python builder/builder.py
env:
PYTHON_VERSION: 3.x # Specify the desired Python version here
- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "Ali Shahidi"
current_date=$(date +"%Y-%m-%d")
git add .
set +e # Grep succeeds with nonzero exit codes to show results.
git status | grep modified
if [ $? -eq 0 ]
then
set -e
git commit -m "Builder running at $current_date from workflow."
git push
else
set -e
echo "No changes since last run"
fi