Skip to content

Commit a6d34cd

Browse files
authored
feat: add wal2json support (#6)
* feat: add wal2json to docker image * chore: clone to subdirectory * chore: add clang * chore: add llvm
1 parent baa5fab commit a6d34cd

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/workflows/publish-beta.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Publish to Docker (beta)
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- beta
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: read
15+
packages: write
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Log in to GitHub Container Registry
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.actor }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
28+
- name: Set up Docker Buildx
29+
uses: docker/setup-buildx-action@v3
30+
31+
- name: Extract repository name
32+
run: |
33+
repo_name="${GITHUB_REPOSITORY#*/}"
34+
repo_name_lowercase=$(echo "$repo_name" | tr '[:upper:]' '[:lower:]') # convert to lowercase
35+
echo "Repository name: $repo_name_lowercase"
36+
echo "REPO_NAME=$repo_name_lowercase" >> $GITHUB_ENV
37+
38+
- name: Build and push
39+
uses: docker/build-push-action@v6
40+
with:
41+
context: .
42+
file: ./Dockerfile
43+
push: true
44+
tags: ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}:beta

Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
11
FROM postgres:17-alpine
22

33
RUN apk add --no-cache aws-cli
4+
5+
# Install dependencies for wal2json
6+
RUN apk add --no-cache \
7+
build-base \
8+
git \
9+
postgresql-dev \
10+
clang \
11+
llvm
12+
13+
# Clone the wal2json repository
14+
RUN git clone https://github.com/eulerto/wal2json.git ./wal2json
15+
16+
# Build and install wal2json
17+
RUN cd /wal2json && \
18+
USE_PGXS=1 make && \
19+
USE_PGXS=1 make install
20+
21+
# Clean up build dependencies
22+
RUN apk del build-base git postgresql-dev clang llvm && \
23+
rm -rf ./wal2json

0 commit comments

Comments
 (0)