Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows update #456

Merged
merged 2 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 14 additions & 28 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 @@ -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
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