Skip to content

Commit f94693b

Browse files
committed
Release both pg 15 and 16
1 parent 357c203 commit f94693b

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.github/workflows/docker-publish.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ jobs:
1818
permissions:
1919
contents: read
2020
packages: write
21+
strategy:
22+
matrix:
23+
pg_version: [15, 16]
24+
include:
25+
- pg_version: 15
26+
is_latest: false
27+
- pg_version: 16
28+
is_latest: true
2129

2230
steps:
2331
- name: Checkout repository
@@ -42,16 +50,18 @@ jobs:
4250
with:
4351
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4452
tags: |
45-
type=raw,value=15
46-
type=raw,value=latest
53+
type=raw,value=${{ matrix.pg_version }}
54+
type=raw,value=latest,enable=${{ matrix.is_latest }}
4755
4856
- name: Build and push
4957
uses: docker/build-push-action@v5
5058
with:
5159
context: .
5260
platforms: linux/amd64,linux/arm64
5361
push: true
62+
build-args: |
63+
PG_VERSION=${{ matrix.pg_version }}
5464
tags: ${{ steps.meta.outputs.tags }}
5565
labels: ${{ steps.meta.outputs.labels }}
56-
cache-from: type=gha
57-
cache-to: type=gha,mode=max
66+
cache-from: type=gha,scope=pg-${{ matrix.pg_version }}
67+
cache-to: type=gha,mode=max,scope=pg-${{ matrix.pg_version }}

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
FROM postgres:15
1+
ARG PG_VERSION
2+
FROM postgres:${PG_VERSION}
23

34
LABEL org.opencontainers.image.source="https://github.com/eigenwallet/postgres-pgcron"
4-
LABEL org.opencontainers.image.description="PostgreSQL 15 with pg_cron extension"
5+
LABEL org.opencontainers.image.description="PostgreSQL ${PG_VERSION} with pg_cron extension"
56
LABEL org.opencontainers.image.licenses="MIT"
67

78
RUN apt-get update \
8-
&& apt-get install -y --no-install-recommends postgresql-15-cron \
9+
&& apt-get install -y --no-install-recommends postgresql-${PG_VERSION}-cron \
910
&& rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)