forked from henryjameslau/cpi-items-actions
-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (29 loc) · 1.06 KB
/
python.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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@v4 # Checkout the repository content to github runner.
- name: Setup Python Version
uses: actions/setup-python@v5
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