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
44 changes: 44 additions & 0 deletions .github/workflows/publish-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish to Docker (beta)

on:
workflow_dispatch:
push:
branches:
- beta

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Extract repository name
run: |
repo_name="${GITHUB_REPOSITORY#*/}"
repo_name_lowercase=$(echo "$repo_name" | tr '[:upper:]' '[:lower:]') # convert to lowercase
echo "Repository name: $repo_name_lowercase"
echo "REPO_NAME=$repo_name_lowercase" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}:beta
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
FROM postgres:17-alpine

RUN apk add --no-cache aws-cli

# Install dependencies for wal2json
RUN apk add --no-cache \
build-base \
git \
postgresql-dev \
clang \
llvm

# Clone the wal2json repository
RUN git clone https://github.com/eulerto/wal2json.git ./wal2json

# Build and install wal2json
RUN cd /wal2json && \
USE_PGXS=1 make && \
USE_PGXS=1 make install

# Clean up build dependencies
RUN apk del build-base git postgresql-dev clang llvm && \
rm -rf ./wal2json