@@ -75,29 +75,14 @@ jobs:
7575 if : contains(github.ref, 'tags')
7676 run : docker push lambgeo/lambda${{ steps.amazonlinux.outputs.version }}-gdal:${{ matrix.gdal-version }}
7777
78- # runtimes:
79- # needs: [build]
80- # runs-on: ubuntu-latest
81- # if: contains(github.ref, 'tags')
82- # strategy:
83- # matrix:
84- # runtimes: [py3.7, py3.8]
85- # steps:
86- # - uses: actions/checkout@v2
87- # - name: Login to DockerHub
88- # uses: docker/login-action@v1
89- # with:
90- # username: ${{ secrets.DOCKERHUB_USERNAME }}
91- # password: ${{ secrets.DOCKERHUB_TOKEN }}
92-
93- # - name: Push to DockerHub
94- # env:
95- # GDAL_VERSIONS: "2.4 3.1 3.2"
96- # run: |
97- # for GDAL_VERSION in ${GDAL_VERSIONS}; do
98- # docker build \
99- # --build-arg GDAL_VERSION=${GDAL_VERSION} \
100- # -f runtimes/${{ matrix.runtimes }} \
101- # -t lambgeo/lambda-gdal:${GDAL_VERSION}-${{ matrix.runtimes }} .
102- # docker push lambgeo/lambda-gdal:${GDAL_VERSION}-${{ matrix.runtimes }}
103- # done
78+ - name : Build Runtime and Push to DockerHub
79+ # if: contains(github.ref, 'tags')
80+ run : |
81+ runtimes=$(if [ '${{ steps.amazonlinux.outputs.version }}' == '2' ]; then echo 'python3.8'; else echo 'python3.7'; fi)
82+ for runtime in ${runtimes}; do
83+ docker build \
84+ --build-arg GDAL_VERSION=${GDAL_VERSION} \
85+ -f runtimes/${runtime} \
86+ -t lambgeo/lambda${{ steps.amazonlinux.outputs.version }}-gdal:${{ matrix.gdal-version }}-${runtime} .
87+ done
88+ # docker push lambgeo/lambda${{ steps.amazonlinux.outputs.version }}-gdal:${GDAL_VERSION}-${runtime}
0 commit comments