Update README #40
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: | |
schedule: | |
- cron: '0 21 * * *' # Runs at 21:00 UTC every day, which is 00:00 UTC+3 | |
workflow_dispatch: # Allows manual triggering | |
permissions: | |
contents: write | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install PyGithub | |
- name: Update README | |
env: | |
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} | |
run: python update_readme.py | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add profile/README.md | |
git diff --quiet && git diff --staged --quiet || git commit -m "Update README with latest repository information" | |
git push |