Skip to content

Run Python Scripts

Run Python Scripts #14

Workflow file for this run

name: Run Python Scripts
on:
schedule:
- cron: '0 * * * *' # This line means it will run at the start of every hour
jobs:
get-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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: Give execute permissions
run: chmod +x $GITHUB_WORKSPACE/scripts/get-info.py
- name: Run get-info.py
run: python $GITHUB_WORKSPACE/scripts/get-info.py
- name: Give execute permissions
run: chmod +x $GITHUB_WORKSPACE/scripts/get-issues.py
- name: Run get_issues.py
run: python $GITHUB_WORKSPACE/scripts/get-issues.py
- name: Give execute permissions
run: chmod +x $GITHUB_WORKSPACE/scripts/get-trophies.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 https://${{ secrets.GH_PAT }}@github.com/wentelteefje/paritytech-prototype.git HEAD:main)