Skip to content

Commit eb368f2

Browse files
committed
2 parents 607f5dd + f35f64c commit eb368f2

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/main.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Scrape latest outage data
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: '*/5 * * * *'
8+
9+
env:
10+
PWRONDATABOT_TOKEN: ${{ secrets.PWRONDATABOT_TOKEN }}
11+
GEOCODE_API_KEY: ${{ secrets.GEOCODE_API_KEY }}
12+
13+
jobs:
14+
scheduled:
15+
runs-on: ubuntu-latest
16+
defaults:
17+
run:
18+
shell: bash
19+
working-directory: outage-data-analysis
20+
21+
steps:
22+
- name: Checkout current repository
23+
uses: actions/checkout@v4
24+
with:
25+
path: outage-data-analysis
26+
27+
- name: Checkout the pse repository
28+
uses: actions/checkout@v4
29+
with:
30+
repository: davemattson/pse-outage
31+
path: pse-outage
32+
33+
- name: Checkout the scl repository
34+
uses: actions/checkout@v4
35+
with:
36+
repository: davemattson/scl-outage
37+
path: scl-outage
38+
39+
- name: Checkout the snopud repository
40+
uses: actions/checkout@v4
41+
with:
42+
repository: davemattson/snopud-outage
43+
path: snopud-outage
44+
45+
- name: Set up Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: '3.x' # Use the latest Python 3 version
49+
50+
- name: Install dependencies
51+
run: |
52+
python -m pip install --upgrade pip
53+
pip install pykml
54+
pip install pandas
55+
pip install pytz
56+
pip install requests
57+
pip install gitpython
58+
59+
- name: Print Working Directory
60+
run: pwd
61+
62+
- uses: qoomon/actions--setup-git@v1
63+
with:
64+
user: bot
65+
66+
- name: Run pse notifier
67+
run: |
68+
echo "Running PSE notifier"
69+
git status
70+
python -u expand.py -r ../pse-outage -i -o output_files -l 2 ../pse-outage/pse-events.json

0 commit comments

Comments
 (0)