Skip to content

Publish

Publish #3

Workflow file for this run

name: Publish
on:
push:
tags: ["v*.*.*"]
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- pg_version: "17.9"
postgis_version: "3"
pgvector_version: "0.8.2"
latest: true
- pg_version: "16.13"
postgis_version: "3"
pgvector_version: "0.8.2"
latest: false
- pg_version: "15.17"
postgis_version: "3"
pgvector_version: "0.8.2"
latest: false
- pg_version: "14.22"
postgis_version: "3"
pgvector_version: "0.8.2"
latest: false
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v6
with:
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}
tags: |
type=raw,value=postgres-${{ matrix.pg_version }}-postgis-${{ matrix.postgis_version }}-pgvector-${{ matrix.pgvector_version }}
type=raw,value=latest,enable=${{ matrix.latest }}
type=ref,event=tag
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
PG_VERSION=${{ matrix.pg_version }}
POSTGIS_VERSION=${{ matrix.postgis_version }}
PGVECTOR_VERSION=${{ matrix.pgvector_version }}
cache-from: type=gha
cache-to: type=gha,mode=max