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
16 changes: 14 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ on: push

env:
# renovate datasource=github-releases depName=timescale/timescaledb
TIMESCALE_VERSION: 2.21.3
TIMESCALE_VERSION: 2.22.1

# renovate datasource=github-releases depName=timescale/timescaledb-toolkit
TIMESCALE_TOOLKIT_VERSION: 1.21.0

jobs:
build:
Expand Down Expand Up @@ -47,6 +50,14 @@ jobs:
echo "minor=$(cut -d. -f-2 <<<"$TIMESCALE_VERSION")"
echo "major=$(cut -d. -f1 <<<"$TIMESCALE_VERSION")"
} >> $GITHUB_OUTPUT
- name: Get Timescale Toolkit version
id: timescale_toolkit
run: |
{
echo "version=$TIMESCALE_TOOLKIT_VERSION"
echo "minor=$(cut -d. -f-2 <<<"$TIMESCALE_TOOLKIT_VERSION")"
echo "major=$(cut -d. -f1 <<<"$TIMESCALE_TOOLKIT_VERSION")"
} >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
Expand Down Expand Up @@ -78,13 +89,14 @@ jobs:
context: .
pull: true
push: ${{ github.ref_name == 'main' }}
platforms: linux/amd64,linux/arm64/v8
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
POSTGRES_VERSION=${{ matrix.postgres_version }}
CLOUDNATIVEPG_VERSION=${{ steps.cnpg.outputs.version }}
TIMESCALE_VERSION=${{ steps.timescale.outputs.version }}
TIMESCALE_TOOLKIT_VERSION=${{ steps.timescale_toolkit.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max

Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

ARG CLOUDNATIVEPG_VERSION

FROM ghcr.io/cloudnative-pg/postgresql:$CLOUDNATIVEPG_VERSION

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Image (pg16)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ghcr.io/cloudnative-pg/postgresql:$CLOUDNATIVEPG_VERSION results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Image (pg17)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ghcr.io/cloudnative-pg/postgresql:$CLOUDNATIVEPG_VERSION results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 5 in Dockerfile

View workflow job for this annotation

GitHub Actions / Build Image (pg15)

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ghcr.io/cloudnative-pg/postgresql:$CLOUDNATIVEPG_VERSION results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/
USER root

ARG POSTGRES_VERSION
ARG TIMESCALE_VERSION
ARG TIMESCALE_TOOLKIT_VERSION
RUN <<EOT
set -eux

Expand All @@ -23,6 +24,11 @@
apt-get update
apt-get install -y --no-install-recommends "timescaledb-2-postgresql-$POSTGRES_VERSION=$TIMESCALE_VERSION~debian$VERSION_ID" "timescaledb-2-loader-postgresql-$POSTGRES_VERSION=$TIMESCALE_VERSION~debian$VERSION_ID"


# Install Timescale Toolkit
apt-get update
apt-get install -y --no-install-recommends "timescaledb-toolkit-postgresql-$POSTGRES_VERSION=1:$TIMESCALE_TOOLKIT_VERSION~debian$VERSION_ID"

# Cleanup
apt-get purge -y curl
rm /etc/apt/sources.list.d/timescaledb.list /etc/apt/trusted.gpg.d/timescale.gpg
Expand Down