Skip to content

Run Python Scripts #423

Run Python Scripts

Run Python Scripts #423

Workflow file for this run

name: Run Python Scripts
on:
schedule:
- cron: '0 12 * * *' # This runs at 12:00 every day
jobs:
get-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
# with:
# token: ${{ secrets.GH_PAT }} # Using the PAT for checkout
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9 # adjust according to your Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests # or any other dependencies your scripts may have
- name: Run get-info.py
run: python $GITHUB_WORKSPACE/scripts/get-info.py
- name: Run get_issues.py
run: python $GITHUB_WORKSPACE/scripts/get-issues.py
- name: Run get_trophies.py
run: python $GITHUB_WORKSPACE/scripts/get-trophies.py
- name: Commit and push if it changed
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
git diff
git diff --quiet || (git add . && git commit -m 'Automated update from GitHub Actions' && git push)