[pre-commit.ci] pre-commit autoupdate #466
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/setup-micromamba@v1 | |
with: | |
environment-file: environment-dev.yml | |
environment-name: landcover-mapping | |
cache-environment: 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 |