Skip to content

Commit 6e85db2

Browse files
committed
feat: name images differently
1 parent 85d32aa commit 6e85db2

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ jobs:
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"
@@ -82,4 +84,5 @@ jobs:
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 }}

.github/workflows/verify.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ jobs:
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"
@@ -86,4 +88,5 @@ jobs:
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 }}

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1+
# main container
2+
FROM ghcr.io/cloudnative-pg/postgresql:16.10-standard-bookworm@sha256:e6f87c0d1ce52cb450d3fd2701ddf6dbf4e1621f52aae9237c12705434c68b51
3+
14
ARG CI_COMMIT_TIMESTAMP
25
ARG CI_COMMIT_SHA
36
ARG CI_COMMIT_TAG
47
ARG CI_UPSTREAM_VERSION
8+
ARG POSTGRESQL_MAJOR_VERSION=16
59
ARG 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-
1211
LABEL org.opencontainers.image.authors="Daniel Muehlbachler-Pietrzykowski <daniel.muehlbachler@niftyside.com>"
1312
LABEL org.opencontainers.image.vendor="Daniel Muehlbachler-Pietrzykowski"
1413
LABEL org.opencontainers.image.source="https://github.com/muhlba91/postgresql-pgvecto-container"
@@ -26,8 +25,8 @@ USER root
2625
# hadolint ignore=DL3008,DL3015,SC2046
2726
RUN 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/*

0 commit comments

Comments
 (0)