update_readme #892
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: update_readme | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Clone repo | |
run: git clone https://github.com/neelabalan/GistOfGists.git | |
- name: Setup Python Environment | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install Requirements | |
run: pip install -r GistOfGists/requirements.txt | |
- name: Execute Python script | |
run: | | |
python GistOfGists/gistofgists.py ${{ secrets.USERNAME }} | |
- name: delete the gistofgists repo | |
run: rm -rf GistOfGists/ | |
- name: setup git config | |
run: | | |
git config user.name ${{ secrets.USERNAME }} | |
git config user.email ${{ secrets.EMAIL }} | |
- name: commit changes | |
run: | | |
git pull | |
git add -A | |
git commit -m "updated README" || echo "No changes to commit" | |
git push |