Update updateDB
This commit is contained in:
parent
3e1c736ded
commit
f50bc7c848
6
.github/workflows/main.yml
vendored
6
.github/workflows/main.yml
vendored
@ -29,8 +29,4 @@ jobs:
|
||||
- name: Update database
|
||||
run: |
|
||||
cd recurring-execution-with-actions
|
||||
git config user.email "action@github.com"
|
||||
git config user.name "GitHub Action"
|
||||
git add isahn_history.json
|
||||
git commit -m 'Update history'
|
||||
git push -f origin master
|
||||
./updateDB.sh
|
||||
|
17
recurring-execution-with-actions/updateDB.sh
Executable file
17
recurring-execution-with-actions/updateDB.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
cd recurring-execution-with-actions
|
||||
git add isahn_history.json
|
||||
set +e # Grep succeeds with nonzero exit codes to show results.
|
||||
git status | grep modified
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
set -e
|
||||
git config user.email "action@github.com"
|
||||
git config user.name "GitHub Action"
|
||||
git commit -am "updated on - $(date)"
|
||||
git push origin master
|
||||
else
|
||||
set -e
|
||||
echo "No changes since last run"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user