Skip to content

Update Repository List #190

Update Repository List

Update Repository List #190

name: Update Repository List
on:
schedule:
- cron: '0 0 * * *' # Run daily at midnight
workflow_dispatch: # Allow manual trigger
jobs:
update-repo-list:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests PyGithub jinja2 markdown pyyaml
- name: Generate repository list
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/generate_content.py
- name: Commit and push if changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git add -A
git diff --quiet && git diff --staged --quiet || (git commit -m "Update repository list" && git push)