Python #179
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python | |
on: | |
schedule: | |
- cron: "01 07 14-27 * MON-FRI" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository content | |
uses: actions/checkout@v2 # Checkout the repository content to github runner. | |
- name: Setup Python Version | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 # Install the python version needed | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pandas requests | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Execute Python script # Run the python script to get the latest data | |
run: python postprocess.py | |
- name: Commit and Push The Results From Python | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add -A | |
git commit -m "GitHub Actions Results added" | |
git push |