File tree Expand file tree Collapse file tree 2 files changed +18
-7
lines changed
Expand file tree Collapse file tree 2 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 1- FROM postgres:15
1+ ARG PG_VERSION
2+ FROM postgres:${PG_VERSION}
23
34LABEL 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"
56LABEL org.opencontainers.image.licenses="MIT"
67
78RUN 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/*
You can’t perform that action at this time.
0 commit comments