4141 docker image save -o /tmp/docker/${{ matrix.image-name }}.tar ${{ matrix.image-name }}:build
4242
4343 - name : Restore base image
44- if : steps.common-cache.outputs.cache-hit ! = 'true'
44+ if : steps.common-cache.outputs.cache-hit = = 'true'
4545 run : |
4646 docker image load -i /tmp/docker/${{ matrix.image-name }}.tar
4747 docker images
@@ -92,41 +92,13 @@ jobs:
9292
9393 python scripts/deploy-layer.py package.zip ${{ matrix.gdal-version }} ${{ matrix.image-version }}
9494
95- base_runtime :
96- needs : [build]
97- runs-on : ubuntu-latest
98- if : contains(github.ref, 'tags')
99- strategy :
100- matrix :
101- gdal-version : [2.4, 3.1]
102- steps :
103- - uses : actions/checkout@v2
104- - name : Login to DockerHub
105- uses : docker/login-action@v1
106- with :
107- username : ${{ secrets.DOCKERHUB_USERNAME }}
108- password : ${{ secrets.DOCKERHUB_TOKEN }}
109-
110- - name : Push to DockerHub
111- env :
112- RUNTIMES : " py3.7"
113- run : |
114- for RUNTIME in ${RUNTIMES}; do
115- docker build \
116- --build-arg GDAL_VERSION=${{ matrix.gdal-version }} \
117- -f runtimes/${RUNTIME} \
118- -t lambgeo/lambda-base:gdal${{ matrix.gdal-version }}-${RUNTIME} .
119-
120- docker push lambgeo/lambda-base:gdal${{ matrix.gdal-version }}-${RUNTIME}
121- done
122-
123- base2_runtime :
95+ runtimes :
12496 needs : [build]
12597 runs-on : ubuntu-latest
12698 if : contains(github.ref, 'tags')
12799 strategy :
128100 matrix :
129- gdal-version : [2.4, 3.1 ]
101+ runtimes : [py3.7, py3.8 ]
130102 steps :
131103 - uses : actions/checkout@v2
132104 - name : Login to DockerHub
@@ -137,13 +109,12 @@ jobs:
137109
138110 - name : Push to DockerHub
139111 env :
140- RUNTIMES : " py3.8 "
112+ GDAL_VERSIONS : " 2.4 3.1 "
141113 run : |
142- for RUNTIME in ${RUNTIMES }; do
114+ for GDAL_VERSION in ${GDAL_VERSIONS }; do
143115 docker build \
144- --build-arg GDAL_VERSION=${{ matrix.gdal-version }} \
145- -f runtimes/${RUNTIME} \
146- -t lambgeo/lambda-base-2:gdal${{ matrix.gdal-version }}-${RUNTIME} .
147-
148- docker push lambgeo/lambda-base-2:gdal${{ matrix.gdal-version }}-${RUNTIME}
116+ --build-arg GDAL_VERSION=${GDAL_VERSION} \
117+ -f runtimes/${{ matrix.runtimes }} \
118+ -t lambgeo/lambda:gdal${GDAL_VERSION}-${{ matrix.runtimes }} .
119+ docker push lambgeo/lambda:gdal${GDAL_VERSION}-${{ matrix.runtimes }}
149120 done
0 commit comments