Skip to content

Commit

Permalink
fix: try to build bookworm on github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rophy committed Jul 13, 2024
1 parent 022bda7 commit 0921799
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 3 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/patroni-citus-k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: rophy/patroni-citus-k8s
on:
push:
paths:
- patroni-citus-k8s/**
pull_request:
paths:
- patroni-citus-k8s/**
jobs:
test:
if: github.ref != 'refs/heads/main' || github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./patroni-citus-k8s
dockerfile: ./patroni-citus-k8s/Dockerfile
push: false
build-and-push:
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set variables
run: |
VER=$(cat patroni-citus-k8s/version.txt)
echo "VERSION=$VER" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./patroni-citus-k8s
dockerfile: ./patroni-citus-k8s/Dockerfile
push: true
tags: rophy/patroni-citus-k8s:${{ env.VERSION }}
6 changes: 3 additions & 3 deletions patroni-citus-k8s/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# https://github.com/patroni/patroni/blob/master/kubernetes/Dockerfile.citus

FROM postgres:16.3-bullseye
FROM postgres:16.3-bookworm
LABEL maintainer="Alexander Kukushkin <[email protected]>"

RUN export DEBIAN_FRONTEND=noninteractive \
Expand Down Expand Up @@ -28,8 +28,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y \
&& apt-get -y install postgresql-16-citus-12.1; \
fi \
&& pip3 install setuptools \
&& pip3 install 'git+https://github.com/patroni/patroni.git#egg=patroni[kubernetes]' \
&& pip3 install --break-system-packages setuptools \
&& pip3 install --break-system-packages 'git+https://github.com/patroni/patroni.git#egg=patroni[kubernetes]' \
&& PGHOME=/home/postgres \
&& mkdir -p $PGHOME \
&& chown postgres $PGHOME \
Expand Down

0 comments on commit 0921799

Please sign in to comment.