Skip to content

Pull Data

Pull Data #122

Workflow file for this run

name: Pull Data
on:
schedule:
- cron: "7 12 * * *"
workflow_dispatch:
jobs:
run-python:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script
run: python src/pull.py
- name: Configure git user and remote to use App token
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
- name: Commit and push changes
run: |
git add ./data
git commit -m 'Update data' || echo "No changes to commit"
git push