Skip to content
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
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ jobs:
id: from_tag
run: |
POSTGRESQL_IMAGE=$(cat Dockerfile | grep 'FROM ghcr.io/cloudnative-pg/postgresql:')
POSTGRESQL_FROM_TAG=$(echo $POSTGRESQL_IMAGE | cut -d':' -f2 | cut -d'@' -f1)
echo "postgresql=${POSTGRESQL_FROM_TAG}" >> "$GITHUB_OUTPUT"
POSTGRESQL_VERSION=$(echo $POSTGRESQL_IMAGE | cut -d':' -f2 | cut -d'@' -f1 | cut -d'-' -f1)
echo "postgresql=${POSTGRESQL_VERSION}" >> "$GITHUB_OUTPUT"
POSTGRESQL_MAJOR_VERSION=$(echo $POSTGRESQL_VERSION | cut -d'.' -f1)
echo "postgresql_major=${POSTGRESQL_MAJOR_VERSION}" >> "$GITHUB_OUTPUT"
VECTORCHORD_IMAGE=$(cat Dockerfile | grep -m 1 'ARG VCHORD_VERSION')
VECTORCHORD_FROM_TAG=$(echo $VECTORCHORD_IMAGE | cut -d'=' -f2)
echo "vchord=${VECTORCHORD_FROM_TAG}" >> "$GITHUB_OUTPUT"
Expand All @@ -82,4 +84,5 @@ jobs:
CI_COMMIT_SHA=${{ github.sha }}
CI_COMMIT_TAG=${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.vchord }}-${{ needs.release.outputs.tag_name }}
CI_UPSTREAM_VERSION=${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.vchord }}
POSTGRESQL_MAJOR_VERSION=${{ steps.from_tag.outputs.postgresql_major }}
VCHORD_VERSION=${{ steps.from_tag.outputs.vchord }}
7 changes: 5 additions & 2 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ jobs:
id: from_tag
run: |
POSTGRESQL_IMAGE=$(cat Dockerfile | grep 'FROM ghcr.io/cloudnative-pg/postgresql:')
POSTGRESQL_FROM_TAG=$(echo $POSTGRESQL_IMAGE | cut -d':' -f2 | cut -d'@' -f1)
echo "postgresql=${POSTGRESQL_FROM_TAG}" >> "$GITHUB_OUTPUT"
POSTGRESQL_VERSION=$(echo $POSTGRESQL_IMAGE | cut -d':' -f2 | cut -d'@' -f1 | cut -d'-' -f1)
echo "postgresql=${POSTGRESQL_VERSION}" >> "$GITHUB_OUTPUT"
POSTGRESQL_MAJOR_VERSION=$(echo $POSTGRESQL_VERSION | cut -d'.' -f1)
echo "postgresql_major=${POSTGRESQL_MAJOR_VERSION}" >> "$GITHUB_OUTPUT"
VECTORCHORD_IMAGE=$(cat Dockerfile | grep -m 1 'ARG VCHORD_VERSION')
VECTORCHORD_FROM_TAG=$(echo $VECTORCHORD_IMAGE | cut -d'=' -f2)
echo "vchord=${VECTORCHORD_FROM_TAG}" >> "$GITHUB_OUTPUT"
Expand All @@ -86,4 +88,5 @@ jobs:
CI_COMMIT_SHA=${{ github.sha }}
CI_COMMIT_TAG=latest
CI_UPSTREAM_VERSION=${{ steps.from_tag.outputs.postgresql }}-${{ steps.from_tag.outputs.vchord }}
POSTGRESQL_MAJOR_VERSION=${{ steps.from_tag.outputs.postgresql_major }}
VCHORD_VERSION=${{ steps.from_tag.outputs.vchord }}
13 changes: 6 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# main container
FROM ghcr.io/cloudnative-pg/postgresql:16.10-standard-bookworm@sha256:e6f87c0d1ce52cb450d3fd2701ddf6dbf4e1621f52aae9237c12705434c68b51

ARG CI_COMMIT_TIMESTAMP
ARG CI_COMMIT_SHA
ARG CI_COMMIT_TAG
ARG CI_UPSTREAM_VERSION
ARG POSTGRESQL_MAJOR_VERSION=16
ARG VCHORD_VERSION=0.4.3

# main container
FROM ghcr.io/cloudnative-pg/postgresql:16.10-standard-bookworm@sha256:e6f87c0d1ce52cb450d3fd2701ddf6dbf4e1621f52aae9237c12705434c68b51

ARG VCHORD_VERSION

LABEL org.opencontainers.image.authors="Daniel Muehlbachler-Pietrzykowski <daniel.muehlbachler@niftyside.com>"
LABEL org.opencontainers.image.vendor="Daniel Muehlbachler-Pietrzykowski"
LABEL org.opencontainers.image.source="https://github.com/muhlba91/postgresql-pgvecto-container"
Expand All @@ -26,8 +25,8 @@ USER root
# hadolint ignore=DL3008,DL3015,SC2046
RUN apt-get update && \
apt-get install -y --no-install-recommends wget ca-certificates && \
wget -q https://github.com/tensorchord/VectorChord/releases/download/${VCHORD_VERSION}/postgresql-16-vchord_${VCHORD_VERSION}-1_$(dpkg --print-architecture).deb -P /tmp && \
apt-get install -y /tmp/postgresql-16-vchord_${VCHORD_VERSION}-1_$(dpkg --print-architecture).deb && \
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 && \
apt-get install -y /tmp/postgresql-${POSTGRESQL_MAJOR_VERSION}-vchord_${VCHORD_VERSION}-1_$(dpkg --print-architecture).deb && \
apt-get remove -y wget ca-certificates && \
apt-get purge -y --auto-remove && \
rm -rf /tmp/* /var/lib/apt/lists/*
Expand Down