File tree Expand file tree Collapse file tree 3 files changed +16
-11
lines changed
Expand file tree Collapse file tree 3 files changed +16
-11
lines changed Original file line number Diff line number Diff line change 6161 id : from_tag
6262 run : |
6363 POSTGRESQL_IMAGE=$(cat Dockerfile | grep 'FROM ghcr.io/cloudnative-pg/postgresql:')
64- POSTGRESQL_FROM_TAG=$(echo $POSTGRESQL_IMAGE | cut -d':' -f2 | cut -d'@' -f1)
65- echo "postgresql=${POSTGRESQL_FROM_TAG}" >> "$GITHUB_OUTPUT"
64+ POSTGRESQL_VERSION=$(echo $POSTGRESQL_IMAGE | cut -d':' -f2 | cut -d'@' -f1 | cut -d'-' -f1)
65+ echo "postgresql=${POSTGRESQL_VERSION}" >> "$GITHUB_OUTPUT"
66+ POSTGRESQL_MAJOR_VERSION=$(echo $POSTGRESQL_VERSION | cut -d'.' -f1)
67+ echo "postgresql_major=${POSTGRESQL_MAJOR_VERSION}" >> "$GITHUB_OUTPUT"
6668 VECTORCHORD_IMAGE=$(cat Dockerfile | grep -m 1 'ARG VCHORD_VERSION')
6769 VECTORCHORD_FROM_TAG=$(echo $VECTORCHORD_IMAGE | cut -d'=' -f2)
6870 echo "vchord=${VECTORCHORD_FROM_TAG}" >> "$GITHUB_OUTPUT"
8284 CI_COMMIT_SHA=${{ github.sha }}
8385 CI_COMMIT_TAG=${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.vchord }}-${{ needs.release.outputs.tag_name }}
8486 CI_UPSTREAM_VERSION=${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.vchord }}
87+ POSTGRESQL_MAJOR_VERSION=${{ steps.from_tag.outputs.postgresql_major }}
8588 VCHORD_VERSION=${{ steps.from_tag.outputs.vchord }}
Original file line number Diff line number Diff line change 6767 id : from_tag
6868 run : |
6969 POSTGRESQL_IMAGE=$(cat Dockerfile | grep 'FROM ghcr.io/cloudnative-pg/postgresql:')
70- POSTGRESQL_FROM_TAG=$(echo $POSTGRESQL_IMAGE | cut -d':' -f2 | cut -d'@' -f1)
71- echo "postgresql=${POSTGRESQL_FROM_TAG}" >> "$GITHUB_OUTPUT"
70+ POSTGRESQL_VERSION=$(echo $POSTGRESQL_IMAGE | cut -d':' -f2 | cut -d'@' -f1 | cut -d'-' -f1)
71+ echo "postgresql=${POSTGRESQL_VERSION}" >> "$GITHUB_OUTPUT"
72+ POSTGRESQL_MAJOR_VERSION=$(echo $POSTGRESQL_VERSION | cut -d'.' -f1)
73+ echo "postgresql_major=${POSTGRESQL_MAJOR_VERSION}" >> "$GITHUB_OUTPUT"
7274 VECTORCHORD_IMAGE=$(cat Dockerfile | grep -m 1 'ARG VCHORD_VERSION')
7375 VECTORCHORD_FROM_TAG=$(echo $VECTORCHORD_IMAGE | cut -d'=' -f2)
7476 echo "vchord=${VECTORCHORD_FROM_TAG}" >> "$GITHUB_OUTPUT"
8688 CI_COMMIT_SHA=${{ github.sha }}
8789 CI_COMMIT_TAG=latest
8890 CI_UPSTREAM_VERSION=${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.vchord }}
91+ POSTGRESQL_MAJOR_VERSION=${{ steps.from_tag.outputs.postgresql_major }}
8992 VCHORD_VERSION=${{ steps.from_tag.outputs.vchord }}
Original file line number Diff line number Diff line change 1+ # main container
2+ FROM ghcr.io/cloudnative-pg/postgresql:16.10-standard-bookworm@sha256:e6f87c0d1ce52cb450d3fd2701ddf6dbf4e1621f52aae9237c12705434c68b51
3+
14ARG CI_COMMIT_TIMESTAMP
25ARG CI_COMMIT_SHA
36ARG CI_COMMIT_TAG
47ARG CI_UPSTREAM_VERSION
8+ ARG POSTGRESQL_MAJOR_VERSION=16
59ARG VCHORD_VERSION=0.4.3
610
7- # main container
8- FROM ghcr.io/cloudnative-pg/postgresql:16.10-standard-bookworm@sha256:e6f87c0d1ce52cb450d3fd2701ddf6dbf4e1621f52aae9237c12705434c68b51
9-
10- ARG VCHORD_VERSION
11-
1211LABEL org.opencontainers.image.authors="Daniel Muehlbachler-Pietrzykowski <daniel.muehlbachler@niftyside.com>"
1312LABEL org.opencontainers.image.vendor="Daniel Muehlbachler-Pietrzykowski"
1413LABEL org.opencontainers.image.source="https://github.com/muhlba91/postgresql-pgvecto-container"
@@ -26,8 +25,8 @@ USER root
2625# hadolint ignore=DL3008,DL3015,SC2046
2726RUN apt-get update && \
2827 apt-get install -y --no-install-recommends wget ca-certificates && \
29- wget -q https://github.com/tensorchord/VectorChord/releases/download/${VCHORD_VERSION}/postgresql-16 -vchord_${VCHORD_VERSION}-1_$(dpkg --print-architecture).deb -P /tmp && \
30- apt-get install -y /tmp/postgresql-16 -vchord_${VCHORD_VERSION}-1_$(dpkg --print-architecture).deb && \
28+ wget -q https://github.com/tensorchord/VectorChord/releases/download/${VCHORD_VERSION}/postgresql-${POSTGRESQL_MAJOR_VERSION} -vchord_${VCHORD_VERSION}-1_$(dpkg --print-architecture).deb -P /tmp && \
29+ apt-get install -y /tmp/postgresql-${POSTGRESQL_MAJOR_VERSION} -vchord_${VCHORD_VERSION}-1_$(dpkg --print-architecture).deb && \
3130 apt-get remove -y wget ca-certificates && \
3231 apt-get purge -y --auto-remove && \
3332 rm -rf /tmp/* /var/lib/apt/lists/*
You can’t perform that action at this time.
0 commit comments