Skip to content

Merge upstream/master and add PostgreSQL 18/PostGIS 3.6 #13

Merge upstream/master and add PostgreSQL 18/PostGIS 3.6

Merge upstream/master and add PostgreSQL 18/PostGIS 3.6 #13

Workflow file for this run

name: ci
permissions:
packages: write
on:
pull_request:
workflow_dispatch:
push:
branches:
- master
schedule:
# Monthly
- cron: 0 0 1 * *
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pg_version: ["18", "17", "16", "15"]
platform: ["amd64", "arm64"]
env:
PG_LATEST: "18"
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: matrix.platform != 'amd64'
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.platform }}
- name: Get build date
id: date
run: echo "date=$(date --rfc-3339=ns)" >> "$GITHUB_OUTPUT"
- name: Get latest tag
id: tag-latest
if: matrix.pg_version == env.PG_LATEST
run: echo "tag=${{ matrix.platform == 'amd64' && ' latest' || format(' latest-{0}', matrix.platform) }}" >> "$GITHUB_OUTPUT"
- name: Build Postgres image
id: buildpg
uses: redhat-actions/buildah-build@v2
with:
image: postgres-autoconf
tags: ${{ matrix.platform == 'amd64' && format('{0}-alpine', matrix.pg_version) || format('{0}-alpine-{1}', matrix.pg_version, matrix.platform) }}${{ steps.tag-latest.outputs.tag || '' }}
context: .
platforms: linux/${{ matrix.platform }}
containerfiles: |
Dockerfile
build-args: |
BUILD_DATE=${{ steps.date.outputs.date }}
VCS_REF=${{ github.sha }}
BASE_TAG=${{ matrix.pg_version }}-alpine
- name: Push Postgres image to GHCR
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.buildpg.outputs.image }}
tags: ${{ steps.buildpg.outputs.tags }}
registry: ghcr.io/openspp
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build PostGIS image
id: buildpgis
uses: redhat-actions/buildah-build@v2
with:
image: postgis-autoconf
tags: ${{ matrix.platform == 'amd64' && format('{0}-alpine', matrix.pg_version) || format('{0}-alpine-{1}', matrix.pg_version, matrix.platform) }}${{ steps.tag-latest.outputs.tag || '' }}
context: .
platforms: linux/${{ matrix.platform }}
containerfiles: |
Dockerfile-GIS
build-args: |
BUILD_DATE=${{ steps.date.outputs.date }}
VCS_REF=${{ github.sha }}
BASE_TAG=${{ matrix.pg_version }}-alpine
- name: Push PostGIS image to GHCR
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.buildpgis.outputs.image }}
tags: ${{ steps.buildpgis.outputs.tags }}
registry: ghcr.io/openspp
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}