-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.32 KB
/
BC-Hydro-Outages.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: BC Hydro Outages
on:
schedule:
- cron: '*/15 * * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up Conda environment
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: bier_env
python-version: 3.11
- name: Install dependencies
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: |
conda env update --file BCHydro-Outages/requirements.yaml --name bier_env
conda list -n bier_env
- name: Run script
shell: bash
env:
AGO_PORTAL_URL: ${{secrets.AGO_PORTAL_URL}}
AGO_USER: ${{secrets.AGO_USER}}
AGO_PASS: ${{secrets.AGO_PASS}}
HYDROOUTAGES_ITEMID: ${{secrets.HYDROOUTAGES_ITEMID}}
HYDROOUTAGES_LFN_ITEMID: ${{secrets.HYDROOUTAGES_LFN_ITEMID}}
run: |
# you may have to activate the environment before running the
# python script, and you likley need to say python3 vs just python
conda init bash
. ~/.bashrc
conda activate bier_env
python3 BCHydro-Outages/BCHydro_Outages.py