Skip to content

Commit

Permalink
workflows update
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakudyaA committed Oct 8, 2023
1 parent b1a32de commit e404aa9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 50 deletions.
34 changes: 10 additions & 24 deletions .github/workflows/build-latest.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -32,6 +18,10 @@ jobs:
- 3
postgisMinorRelease:
- 4
imageVersion:
- imageDistro: debian
imageDistroVersion: bookworm
imageDistroVariant: slim
scenario:
- datadir_init
- streaming_replication
Expand All @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
39 changes: 13 additions & 26 deletions .github/workflows/deploy-image.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e404aa9

Please sign in to comment.