From c4fa12fd1bae1be4d1d0852d7de88bf703472e4f Mon Sep 17 00:00:00 2001 From: mazano Date: Sun, 8 Oct 2023 14:32:53 +0200 Subject: [PATCH] workflows update (#456) * workflows update * workflows updates --- .github/workflows/build-latest.yaml | 42 ++++++++++------------------- .github/workflows/deploy-image.yaml | 39 +++++++++------------------ 2 files changed, 27 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build-latest.yaml b/.github/workflows/build-latest.yaml index 43bbee98..17333e84 100644 --- a/.github/workflows/build-latest.yaml +++ b/.github/workflows/build-latest.yaml @@ -1,19 +1,5 @@ name: build-latest on: -# workflow_dispatch: -# inputs: -# distro: -# description: Base image distro -# required: true -# default: debian -# imageVersion: -# description: Base distro image version/release -# required: true -# default: bookworm -# imageVariant: -# description: Base image variant -# required: true -# default: slim workflow_dispatch: pull_request: branches: @@ -32,6 +18,10 @@ jobs: - 3 postgisMinorRelease: - 4 + imageVersion: + - imageDistro: debian + imageDistroVersion: bookworm + imageDistroVariant: slim scenario: - datadir_init - streaming_replication @@ -40,10 +30,6 @@ jobs: - logical_replication - init_scripts - multiple_databases - include: - - distro: debian - imageVersion: bookworm - imageVariant: slim steps: - uses: actions/checkout@v4 - name: Set up QEMU @@ -60,9 +46,9 @@ jobs: load: true tags: kartoza/postgis:manual-build build-args: | - DISTRO=${{ matrix.distro }} - IMAGE_VERSION=${{ matrix.imageVersion }} - IMAGE_VARIANT=${{ matrix.imageVariant }} + DISTRO=${{ matrix.imageVersion.imageDistro }} + IMAGE_VERSION=${{ matrix.imageVersion.imageDistroVersion }} + IMAGE_VARIANT=${{ matrix.imageVersion.imageDistroVariant }} LANGS=en_US.UTF-8,id_ID.UTF-8 GENERATE_ALL_LOCALE=0 POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }} @@ -95,10 +81,10 @@ jobs: - 3 postgisMinorRelease: - 4 - include: - - distro: debian - imageVersion: bookworm - imageVariant: slim + imageVersion: + - imageDistro: debian + imageDistroVersion: bookworm + imageDistroVariant: slim steps: - uses: actions/checkout@v4 - name: Set up QEMU @@ -130,9 +116,9 @@ jobs: tags: | ${{ steps.docker_meta.outputs.tags }}-${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }} build-args: | - DISTRO=${{ matrix.distro }} - IMAGE_VERSION=${{ matrix.imageVersion }} - IMAGE_VARIANT=${{ matrix.imageVariant }} + DISTRO=${{ matrix.imageVersion.imageDistro }} + IMAGE_VERSION=${{ matrix.imageVersion.imageDistroVersion }} + IMAGE_VARIANT=${{ matrix.imageVersion.imageDistroVariant }} LANGS=en_US.UTF-8,id_ID.UTF-8 GENERATE_ALL_LOCALE=0 POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }} diff --git a/.github/workflows/deploy-image.yaml b/.github/workflows/deploy-image.yaml index 17165be0..894d7cb6 100644 --- a/.github/workflows/deploy-image.yaml +++ b/.github/workflows/deploy-image.yaml @@ -1,19 +1,6 @@ name: deploy-image on: workflow_dispatch: -# inputs: -# distro: -# description: Base image distro -# required: true -# default: debian -# imageVersion: -# description: Base distro image version/release -# required: true -# default: bookworm -# imageVariant: -# description: Base image variant -# required: true -# default: slim workflow_run: workflows: - build-latest @@ -34,10 +21,10 @@ jobs: - 3 postgisMinorRelease: - 4 - include: - - distro: debian - imageVersion: bookworm - imageVariant: slim + imageVersion: + - imageDistro: debian + imageDistroVersion: bookworm + imageDistroVariant: slim steps: - uses: actions/checkout@v4 - name: Set up QEMU @@ -69,15 +56,15 @@ jobs: push: true tags: | ${{ secrets.DOCKERHUB_REPO }}/postgis:base - ${{ secrets.DOCKERHUB_REPO }}/postgis:base-${{ matrix.distro }}-${{ matrix.imageVersion }}-${{ matrix.imageVariant }} + ${{ secrets.DOCKERHUB_REPO }}/postgis:base-${{ matrix.imageVersion.imageDistro }}-${{ matrix.imageVersion.imageDistroVersion }}-${{ matrix.imageVersion.imageDistroVariant }} build-args: | - DISTRO=${{ matrix.distro }} - IMAGE_VERSION=${{ matrix.imageVersion }} - IMAGE_VARIANT=${{ matrix.imageVariant }} + DISTRO=${{ matrix.imageVersion.imageDistro }} + IMAGE_VERSION=${{ matrix.imageVersion.imageDistroVersion }} + IMAGE_VARIANT=${{ matrix.imageVersion.imageDistroVariant }} GENERATE_ALL_LOCALE=1 POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }} POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }} - POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }} + POSTGIS_MINOR_VERSION=${{ matrix.postgisMinorVersion }} cache-from: | type=gha,scope=test type=gha,scope=prod @@ -99,13 +86,13 @@ jobs: ${{ secrets.DOCKERHUB_REPO }}/postgis:${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }} ${{ secrets.DOCKERHUB_REPO }}/postgis:${{ matrix.postgresMajorVersion }}-${{ matrix.postgisMajorVersion }}.${{ matrix.postgisMinorRelease }}--v${{ steps.current_date.outputs.formatted }} build-args: | - DISTRO=${{ matrix.distro }} - IMAGE_VERSION=${{ matrix.imageVersion }} - IMAGE_VARIANT=${{ matrix.imageVariant }} + DISTRO=${{ matrix.imageVersion.imageDistro }} + IMAGE_VERSION=${{ matrix.imageVersion.imageDistroVersion }} + IMAGE_VARIANT=${{ matrix.imageVersion.imageDistroVariant }} GENERATE_ALL_LOCALE=1 POSTGRES_MAJOR_VERSION=${{ matrix.postgresMajorVersion }} POSTGIS_MAJOR_VERSION=${{ matrix.postgisMajorVersion }} - POSTGIS_MINOR_VERSION=${{ matrix.postgresMinorVersion }} + POSTGIS_MINOR_VERSION=${{ matrix.postgisMinorVersion }} cache-from: | type=gha,scope=test type=gha,scope=prod