Skip to content

Docker image

Docker image #26

Workflow file for this run

name: Build Docker
on:
push:
tags: ["v*"]
branches: ["main"]
pull_request:
paths:
- Dockerfile
- docker-bake.hcl
- ".github/workflows/docker.yaml"
jobs:
docker:
name: Build Docker
runs-on: ubuntu-24.04
strategy:
# fail-fast: false
matrix:
postgres: ["15", "16", "17"]
platform: ["linux/amd64", "linux/arm64"]
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout pg_duckdb extension code
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Set env
run: |
echo "POSTGRES_IMAGE=${{ format('wuputah/pg_duckdb:{0}-{1}', matrix.postgres, github.sha) }}" >> $GITHUB_ENV
echo "POSTGRES_VERSION=${{ matrix.postgres }}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
with:
platforms: ${{ matrix.platform }}
- name: docker bake
uses: docker/bake-action@v5
with:
targets: pg_duckdb_${{ matrix.postgres }}
set: |
*.platform=${{ matrix.platform }}
*.cache-to=type=gha,mode=max
*.cache-from=type=gha
postgres.tags=${{ env.POSTGRES_IMAGE }}