-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (40 loc) · 1.66 KB
/
tindex_dsm_dtm_he.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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