.github/workflows/geocode_csv.yaml #1087
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
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- .github/workflows/geocode_csv.yaml | |
- R/prep_geocode_csv.R | |
- R/clean_after_geocode_csv.R | |
schedule: | |
- cron: "30 6 * * *" | |
jobs: | |
job1: | |
runs-on: ubuntu-latest | |
container: | |
image: lespelleteux/docker_for_gwells | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_PAT }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
BCGOV_GEOCODER_API: ${{ secrets.BCGOV_GEOCODER_API }} | |
BCGOV_DB: ${{ secrets.BCGOV_DB }} | |
BCGOV_HOST: ${{ secrets.BCGOV_HOST }} | |
BCGOV_PWD: ${{ secrets.BCGOV_PWD }} | |
BCGOV_USR: ${{ secrets.BCGOV_USR }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name : copy gwells_geocodeqa script | |
run: | | |
mv data github_data | |
wget https://raw.githubusercontent.com/bcgov/GWELLS_LocationQA/main/gwells_locationqa.py | |
mkdir data | |
- name: prepare csvs for geocode input | |
run: | | |
Rscript R/prep_geocode_csv.R | |
- name: ls * | |
run: | | |
ls * -lh | |
- name: ls * | |
run: | | |
ls data/* -lh | |
- name: run geocode python script | |
run: | | |
./python/geocode.sh | |
- name: ls * | |
run: | | |
ls * -lh | |
- name: ls * | |
run: | | |
ls data/* -lh | |
- name: clean afer geocode | |
run: | | |
Rscript R/clean_after_geocode_csv.R | |
- name: ls * | |
run: | | |
ls * -lh | |
- name: ls * | |
run: | | |
ls data/* -lh | |
- name: Commit results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add 'data/wells_geocoded.csv' || echo "ECHO No changes to commit" | |
git commit -m "automatic update" || echo "ECHO No changes to commit" | |
git push origin || echo "ECHO No changes to commit" | |
git status | |
- name: Session info | |
run: | | |
options(width = 140) | |
pkgs <- installed.packages()[, "Package"] | |
sessioninfo::session_info(pkgs, include_base = TRUE) | |
shell: Rscript {0} |