Update nDSM NW Tile Index #14
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: Update nDSM NW Tile Index | |
on: | |
schedule: | |
# run tile index creation every month | |
- cron: '0 1 9 * *' | |
jobs: | |
update-tindex-ndsm-nw: | |
runs-on: ubuntu-latest | |
env: | |
CI_COMMIT_MESSAGE: Update NW nDSM tile index | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Creation of tindex | |
run: | | |
sed -i "s+RUN python3 DOP/NW/openNRW_DOP_tindex.py+RUN grass -c epsg:25832 /grassdb/NW_nDSM --exec python3 nDSM/NW/openNRW_nDSM_tindex.py+g" docker/Dockerfile | |
docker build -f docker/Dockerfile -t test-tindex . | |
ID=$(docker create test-tindex) | |
echo $ID | |
docker cp $ID:/src/tile-indices/nDSM/NW/nrw_ndom_tindex_proj.gpkg.gz nDSM/NRW/ | |
# Commit and push all changed files. | |
- name: Upload tindex | |
# Only run on main branch push (e.g. after pull request merge). | |
run: | | |
ID=$(docker create test-tindex) | |
echo ${ID} | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
git add nDSM/NRW/nrw_ndom_tindex_proj.gpkg.gz | |
git commit -m "${{ env.CI_COMMIT_MESSAGE }}" | |
git push |