-
Notifications
You must be signed in to change notification settings - Fork 31
44 lines (40 loc) · 1.15 KB
/
data-pipeline.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
name: Data Pipeline
on:
pull_request:
branches: [ master ]
jobs:
data-pipeline:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup environment
uses: mamba-org/provision-with-micromamba@main
with:
environment-file: environment-dev.yml
environment-name: landcover-mapping
cache-env: true
- uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- uses: google-github-actions/setup-gcloud@v0
- name: Run data pipeline
env:
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
run: |
dvc pull -f
openmapflow create-datasets --non-interactive
dvc commit -f
dvc push
- name: Push automated dataset updates
run: |
git config --global user.name 'Dataset bot'
git config --global user.email '[email protected]'
git pull
git add data
git commit -m "Automated dataset updates" || echo "No updates to commit"
git push