Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timescale toolkit #30

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 13 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ env:
# renovate datasource=github-releases depName=timescale/timescaledb
TIMESCALE_VERSION: 2.17.1

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

jobs:
build:
name: Build Image (pg${{ matrix.postgres_version }})
Expand Down Expand Up @@ -50,6 +53,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@v5
Expand Down Expand Up @@ -81,13 +92,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
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ USER root

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

Expand All @@ -23,6 +24,10 @@ RUN <<EOT
apt-get update
apt-get install -y --no-install-recommends "timescaledb-2-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