Skip to content

Fetch the Latest GitHub Data & Update README #103

Fetch the Latest GitHub Data & Update README

Fetch the Latest GitHub Data & Update README #103

Workflow file for this run

name: Fetch the Latest GitHub Data & Update README
on:
workflow_dispatch:
schedule:
- cron: '0 18 * * 5'
push:
branches:
- main
permissions:
contents: write
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
jobs:
fetch:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Update JSON data and build README
run: python run.py -t ${{ env.GH_TOKEN }} all
- name: Commit and push changes
run: |-
git add .
git diff
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action Bot"
git commit -m "Updated JSON & README with the latest live repo data" -a || echo "No changes to commit"
git push