-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: try to build bookworm on github actions
- Loading branch information
Showing
2 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ | ||
|
@@ -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 \ | ||
|