kopia lustrzana https://github.com/kartoza/docker-postgis
Optimize docker buildx cache
rodzic
8c9f610e4e
commit
bd42b7632f
|
@ -59,6 +59,7 @@ jobs:
|
|||
context: .
|
||||
file: Dockerfile
|
||||
push: false
|
||||
load: true
|
||||
tags: ${{ secrets.DOCKERHUB_REPO }}/postgis:base-${{ matrix.distro }}-${{ matrix.imageVersion }}-${{ matrix.imageVariant }}
|
||||
build-args: |
|
||||
DISTRO=${{ matrix.distro }}
|
||||
|
@ -69,7 +70,7 @@ jobs:
|
|||
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
|
||||
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
|
||||
target: postgis-base
|
||||
|
||||
- name: Build prod image
|
||||
|
@ -90,9 +91,30 @@ jobs:
|
|||
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
|
||||
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
|
||||
target: postgis-prod
|
||||
|
||||
- name: Build image for testing
|
||||
id: docker_build_testing_image
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
push: false
|
||||
load: true
|
||||
tags: kartoza/postgis:manual-build
|
||||
build-args: |
|
||||
DISTRO=${{ matrix.distro }}
|
||||
IMAGE_VERSION=${{ matrix.imageVersion }}
|
||||
IMAGE_VARIANT=${{ matrix.imageVariant }}
|
||||
GENERATE_ALL_LOCALE=0
|
||||
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
|
||||
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
|
||||
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache
|
||||
target: postgis-test
|
||||
|
||||
run-scenario-tests:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build-image ]
|
||||
|
@ -145,6 +167,7 @@ jobs:
|
|||
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
|
||||
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
|
||||
POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }}
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
target: postgis-test
|
||||
|
||||
- name: Run scenario test
|
||||
|
|
Ładowanie…
Reference in New Issue