Skip to content

Update Projects Data #253

Update Projects Data

Update Projects Data #253

Workflow file for this run

name: Update Projects Data
on:
schedule:
- cron: "0 0 * * *"
push:
paths:
- "get_repos.py"
- ".github/workflows/update_data.yaml"
jobs:
main:
name: Generate and push latest data
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Configure python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Requirements
run: pip install --no-cache-dir requests
- name: Run Python Script
run: python get_repos.py
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Commit and Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ -n "$(git status --porcelain src/data/)" ]; then
echo "[+] src/data has been updated"
git add src/data/
git commit -m "chore(data): update projects data"
git push https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }} HEAD:${{ github.ref }}
else
echo "[-] No change in src/data/"
fi