forked from CROCUS-Urban/instrument-cookbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.3 KB
/
run-data-flow.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
name: data-flow
on:
schedule:
- cron: '5 * * * *' # run hourly
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'CROCUS-Urban/instrument-cookbooks'
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup miniconda environment
uses: conda-incubator/setup-miniconda@main
with:
channels: conda-forge
activate-environment: instrument-cookbooks-dev
environment-file: environment.yml
miniforge-variant: Mambaforge
use-mamba: true
- name: Verify environment installation
run: conda env list
- name: Run the ambient weather api script
shell: bash -l {0}
env:
AMBIENT_API_KEY: '${{ secrets.AMBIENT_API_KEY }}'
AMBIENT_APPLICATION_KEY: '${{ secrets.AMBIENT_APPLICATION_KEY }}'
AMBIENT_ENDPOINT: '${{ secrets.AMBIENT_ENDPOINT }}'
run: |
cd scripts/ambient_weather/
python process_ambient_data.py
- name: Commit new changes
uses: EndBug/add-and-commit@v9
with:
add: '-A'
default_author: github_actions
message: '[skip ci] Hourly data updates'