Skip to content

try to get logs

try to get logs #7

name: Update DSM and DTM HE Tile Index
on:
push:
branches: [ HE_DTM_DSM ]
# branches: [ main ]
# schedule:
# # run tile index creation every month
# - cron: '0 2 10 * *'
jobs:
update-tindex-dsm-and-dtm-hh:
runs-on: ubuntu-latest
env:
CI_COMMIT_MESSAGE: Update HE 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/HE_DSM --exec python3 DSM/HE/HE_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/HE/HE_DSM_tindex.gpkg.gz DSM/HE/
# Commit and push all changed files.
- name: Creation of DTM tindex
run: |
sed -i "s+RUN grass -c epsg:25832 /grassdb/HE_DSM --exec python3 DSM/HE/HE_DSM_tindex.py+RUN grass -c epsg:25832 /grassdb/HE_DSM --exec python3 DTM/HE/HE_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/HE/HE_DTM_tindex.gpkg.gz DTM/HE/
# 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 "$GITHUB_ACTOR@users.noreply.github.com"
git add DTM/HE/HE_DSM_tindex.gpkg.gz
git add DSM/HE/HE_DTM_tindex.gpkg.gz
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push