diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 55c25ed..d21516b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -86,5 +86,4 @@ jobs: labels: ${{ steps.metadata.outputs.labels }} build-args: | CNPG_TAG=${{ matrix.cnpgTag }} - PG_MAJOR=${{ steps.version.outputs.pg_major }} PGVECTORS_TAG=${{ matrix.pgvectorsVersion }} diff --git a/Dockerfile b/Dockerfile index 7222a13..660394a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,11 +2,12 @@ ARG CNPG_TAG FROM curlimages/curl AS download -ARG PG_MAJOR +ARG CNPG_TAG ARG PGVECTORS_TAG WORKDIR /download -RUN curl -o pgvectors.deb -sSL https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg$PG_MAJOR-$PGVECTORS_TAG-$(uname -m)-unknown-linux-gnu.deb +RUN pg_major=$(echo $CNPG_TAG | cut -d'.' -f1) \ + && curl -o pgvectors.deb -sSL https://github.com/tensorchord/pgvecto.rs/releases/download/$PGVECTORS_TAG/vectors-pg${pg_major}-$PGVECTORS_TAG-$(uname -m)-unknown-linux-gnu.deb FROM ghcr.io/cloudnative-pg/postgresql:$CNPG_TAG