try building image directly (#486)

Co-authored-by: Admire Nyakudya <mazano@MacBookAir.Dlink>
pull/487/head
mazano 2024-10-19 22:27:44 +02:00 zatwierdzone przez GitHub
rodzic 885e33347f
commit 63664223c9
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 29 dodań i 29 usunięć

Wyświetl plik

@ -49,31 +49,31 @@ jobs:
id: current_date id: current_date
run: echo "formatted=$(date -u +%Y.%m.%d)" >> $GITHUB_OUTPUT run: echo "formatted=$(date -u +%Y.%m.%d)" >> $GITHUB_OUTPUT
- name: Build base image # - name: Build base image
id: docker_build_base # id: docker_build_base
uses: docker/build-push-action@v6 # uses: docker/build-push-action@v6
with: # with:
context: . # context: .
platforms: linux/amd64,linux/arm64 # platforms: linux/amd64,linux/arm64
file: Dockerfile # file: Dockerfile
push: true # push: true
tags: | # tags: |
${{ secrets.DOCKERHUB_REPO }}/postgis:base # ${{ secrets.DOCKERHUB_REPO }}/postgis:base
${{ secrets.DOCKERHUB_REPO }}/postgis:base-${{ matrix.imageVersion.imageDistro }}-${{ matrix.imageVersion.imageDistroVersion }}-${{ matrix.imageVersion.imageDistroVariant }} # ${{ secrets.DOCKERHUB_REPO }}/postgis:base-${{ matrix.imageVersion.imageDistro }}-${{ matrix.imageVersion.imageDistroVersion }}-${{ matrix.imageVersion.imageDistroVariant }}
build-args: | # build-args: |
DISTRO=${{ matrix.imageVersion.imageDistro }} # DISTRO=${{ matrix.imageVersion.imageDistro }}
IMAGE_VERSION=${{ matrix.imageVersion.imageDistroVersion }} # IMAGE_VERSION=${{ matrix.imageVersion.imageDistroVersion }}
IMAGE_VARIANT=${{ matrix.imageVersion.imageDistroVariant }} # IMAGE_VARIANT=${{ matrix.imageVersion.imageDistroVariant }}
GENERATE_ALL_LOCALE=1 # GENERATE_ALL_LOCALE=1
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }} # POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }} # POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgisMinorRelease }} # POSTGIS_MINOR_VERSION=${{ matrix.postgisMinorRelease }}
cache-from: | # cache-from: |
type=gha,scope=test # type=gha,scope=test
type=gha,scope=prod # type=gha,scope=prod
type=gha,scope=base # type=gha,scope=base
cache-to: type=gha,scope=base # cache-to: type=gha,scope=base
target: postgis-base # target: postgis-base
- name: Build prod image - name: Build prod image
id: docker_build_prod id: docker_build_prod
@ -96,10 +96,10 @@ jobs:
POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }} POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }}
POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }} POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }}
POSTGIS_MINOR_VERSION=${{ matrix.postgisMinorRelease }} POSTGIS_MINOR_VERSION=${{ matrix.postgisMinorRelease }}
cache-from: | # cache-from: |
type=gha,scope=test # type=gha,scope=test
type=gha,scope=prod # type=gha,scope=prod
type=gha,scope=base # type=gha,scope=base
cache-to: type=gha,scope=prod cache-to: type=gha,scope=prod
target: postgis-prod target: postgis-prod