|
30 | 30 |
|
31 | 31 | - name: Build tilemaker |
32 | 32 | run: | |
33 | | - mkdir ${{ github.workspace }}\build |
| 33 | + mkdir ${{ github.workspace }}\build |
34 | 34 | cd ${{ github.workspace }}\build && cmake -DTILEMAKER_BUILD_STATIC=ON -DVCPKG_TARGET_TRIPLET="x64-windows-static-md" -DCMAKE_TOOLCHAIN_FILE="c:\vcpkg\scripts\buildsystems\vcpkg.cmake" .. |
35 | 35 | cd ${{ github.workspace }}\build && cmake --build . --config RelWithDebInfo |
36 | 36 |
|
|
48 | 48 | ${{ github.workspace }}\build\RelWithDebInfo\tilemaker.exe |
49 | 49 | ${{ github.workspace }}\build\RelWithDebInfo\*.pdb |
50 | 50 |
|
51 | | - unix-build: |
52 | | - strategy: |
53 | | - matrix: |
| 51 | + unix-build: |
| 52 | + strategy: |
| 53 | + matrix: |
54 | 54 | include: |
55 | 55 | - os: ubuntu-18.04 |
56 | 56 | triplet: x64-linux |
@@ -82,10 +82,10 @@ jobs: |
82 | 82 |
|
83 | 83 | - name: Build tilemaker |
84 | 84 | run: | |
85 | | - mkdir build |
86 | | - cd build |
| 85 | + mkdir build |
| 86 | + cd build |
87 | 87 | cmake -DTILEMAKER_BUILD_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} -DCMAKE_CXX_COMPILER=g++ .. |
88 | | - cmake --build . |
| 88 | + cmake --build . |
89 | 89 | strip tilemaker |
90 | 90 |
|
91 | 91 | - name: Build openmaptiles-compatible mbtiles files of Liechtenstein |
@@ -115,5 +115,37 @@ jobs: |
115 | 115 | - name: Build openmaptiles-compatible mbtiles files of given area |
116 | 116 | uses: ./ |
117 | 117 | with: |
118 | | - input: ${{ env.AREA }}.osm.pbf |
| 118 | + input: ${{ env.AREA }}.osm.pbf |
119 | 119 | output: ${{ env.AREA }}.mbtiles |
| 120 | + |
| 121 | + dockerhub: |
| 122 | + # we only want to push to dockerhub on the main repo |
| 123 | + if: github.repository_owner == 'systemed' && github.event_name == 'push' && github.ref == 'refs/heads/master' |
| 124 | + |
| 125 | + name: Push container image to Dockerhub |
| 126 | + |
| 127 | + runs-on: ubuntu-latest |
| 128 | + needs: Github-Action # this job also uses docker and contains a simple test |
| 129 | + |
| 130 | + steps: |
| 131 | + - name: Check out repository |
| 132 | + uses: actions/checkout@v2 |
| 133 | + |
| 134 | + - name: Login to DockerHub |
| 135 | + uses: docker/login-action@v1 |
| 136 | + with: |
| 137 | + username: tilemakerbot |
| 138 | + password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 139 | + |
| 140 | + - name: Build container image |
| 141 | + run: | |
| 142 | + docker build . \ |
| 143 | + -t lehrenfried/tilemaker:${{ github.sha }} \ |
| 144 | + -t lehrenfried/tilemaker:latest |
| 145 | +
|
| 146 | + - name: Push container image |
| 147 | + run: | |
| 148 | + docker push \ |
| 149 | + lehrenfried/tilemaker:${{ github.sha }} \ |
| 150 | + lehrenfried/tilemaker:latest |
| 151 | +
|
0 commit comments