Skip to content

BC Hydro Outages #21879

BC Hydro Outages

BC Hydro Outages #21879

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