Cyder Statistics #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cyder Statistics | |
on: | |
schedule: [{cron: "0 5 * * *"}] | |
workflow_dispatch: | |
jobs: | |
generate_images: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: pip install -r actions/requirements.txt | |
- name: Run statistic generator | |
run: | | |
python ./actions/stat_generator.py | |
- name: Commit and Push generated files | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
git config --local user.email "nathan.vincent.2.718@gmail.com" | |
git config --local user.name "nathancheshire" | |
git add . | |
git commit -m "update statistics badges" -m "`date`" | |
git push -u origin main | |
else | |
echo "No files changed; job complete" | |
fi | |