build #7799
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: build | |
permissions: | |
contents: write | |
# execute this workflow automatically, but only when pushing to master | |
on: | |
push: | |
# branches: [ master ] | |
# pull_request: | |
# branches: [ master ] | |
schedule: | |
- cron: 20 * * * * # every hour, 20 minutes past the hour | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Update README.md file | |
shell: bash | |
run: | | |
# install depends | |
sudo apt-get update | |
sudo apt-get install python3-pandas python3-tabulate pkg-config libssl-dev | |
# generate the lemmy-stats-crawler.json file | |
./stats-crawler.sh | |
# get uptimes of lemmy instances | |
./get-uptime.sh | |
# get age of lemmy instances | |
./get-age.sh | |
# process the json file and update the README.md file | |
./generate_readme.py | |
# push new README to GitHub | |
git config --global user.name 'maltfield' | |
git config --global user.email 'michael@michaelaltfield.net' | |
git add -f awesome-lemmy-instances.csv | |
git add -f README.md | |
git commit -am "Auto-update" | |
git push | |