Skip to content

Commit 2c7581d

Browse files
committed
runtime
1 parent 15b0a6a commit 2c7581d

File tree

2 files changed

+13
-42
lines changed

2 files changed

+13
-42
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
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

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818
Based on lambci/lambda-base:build (amazonlinux)
1919
- GDAL 3.1.3 (Oct. 2020)
2020
- **lambgeo/lambda-base:gdal3.1**
21-
- **lambgeo/lambda-base:gdal3.1-py3.7**
21+
- **lambgeo/lambda:gdal3.1-py3.7**
2222

2323
- GDAL 2.4.4 (June 2020)
2424
- **lambgeo/lambda-base:gdal2.4**
25-
- **lambgeo/lambda-base:gdal2.4-py3.7**
25+
- **lambgeo/lambda:gdal2.4-py3.7**
2626

2727
Based on lambci/lambda-base-2:build (amazonlinux2)
2828
- GDAL 3.1.3 (Oct. 2020)
2929
- **lambgeo/lambda-base-2:gdal3.1**
30-
- **lambgeo/lambda-base-2:gdal3.1-py3.8**
30+
- **lambgeo/lambda:gdal3.1-py3.8**
3131

3232
- GDAL 2.4.4 (June 2020)
3333
- **lambgeo/lambda-base-2:gdal2.4**
34-
- **lambgeo/lambda-base-2:gdal2.4-py3.8**
34+
- **lambgeo/lambda:gdal2.4-py3.8**
3535

3636

3737
# Lambda Layers

0 commit comments

Comments
 (0)