Skip to content

Run Assets update monthly #3

Run Assets update monthly

Run Assets update monthly #3

Workflow file for this run

name: Run Assets update monthly
on:
schedule:
- cron: '0 14 1 * *' # Runs at 6AM PST (2PM UTC) on the 1st day of every month
workflow_dispatch:
jobs:
run-scripts:
if: github.repository == 'bcgov/nr-parc-bcparks-assets' # This ensures that only the ORIGINAL bcgov repo workflow is run (not the forks!)
runs-on: ubuntu-latest
env:
PG_HOST_CW: ${{ secrets.PG_HOST_CW}}
PG_PORT_CW: ${{ secrets.PG_PORT_CW}}
PG_DATABASE_CW: ${{ secrets.PG_DATABASE_CW}}
PG_USER_CW: ${{ secrets.PG_USER_CW}}
PG_PASSWORD_CW: ${{ secrets.PG_PASSWORD_CW}}
AGO_HOST: ${{ secrets.AGO_HOST}}
AGO_USERNAME_DSS: ${{ secrets.AGO_USERNAME_DSS}}
AGO_PASSWORD_DSS: ${{ secrets.AGO_PASSWORD_DSS}}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install libkrb5 for Kerberos on Linux
run: |
sudo apt install -y libkrb5-dev
pip install requests-kerberos
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Assets update
run: python bcparks_assets_data_workflow.py