Skip to content

trigger GHA

trigger GHA #7

name: Update DSM HH Tile Index
on:
push:
branches: [ main ]
# schedule:
# # run tile index creation every month
# - cron: '0 2 9 * *'
jobs:
update-tindex-dsm-and-dtm-hh:
runs-on: ubuntu-latest
env:
CI_COMMIT_MESSAGE: Update HH DSM and DTM tile index
steps:
- uses: actions/checkout@v4
- name: Creation of DSM tindex
run: |
sed -i "s+RUN python3 DOP/NW/openNRW_DOP_tindex.py+RUN grass -c epsg:25832 /grassdb/HH_DSM --exec python3 DSM/HH/HH_DSM_tindex.py+g" docker/Dockerfile
docker build -f docker/Dockerfile -t test-tindex-dsm .
ID=$(docker create test-tindex-dsm)
echo $ID
docker cp $ID:/src/tile-indices/DSM/HH/hh_dom_tindex_proj.gpkg.gz DSM/HH/
# Commit and push all changed files.
- name: Creation of DTM tindex
run: |
sed -i "s+RUN grass -c epsg:25832 /grassdb/HH_DSM --exec python3 DSM/HH/HH_DSM_tindex.py+RUN grass -c epsg:25832 /grassdb/HH_DSM --exec python3 DTM/HH/HH_DTM_tindex.py+g" docker/Dockerfile
docker build -f docker/Dockerfile -t test-tindex-dtm .
ID=$(docker create test-tindex-dtm)
echo $ID
docker cp $ID:/src/tile-indices/DTM/HH/hh_dgm1_tindex_proj.gpkg.gz DTM/HH/
# Commit and push all changed files.
- name: Upload DTM and DSM tindex
# Only run on main branch push (e.g. after pull request merge).
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add DTM/HH/hh_dgm1_tindex_proj.gpkg.gz
git add DSM/HH/hh_dom_tindex_proj.gpkg.gz
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push