Skip to content

Try publishing a package #4

Try publishing a package

Try publishing a package #4

Workflow file for this run

---
name: Build and publish Docker image
env:
POSTGRES_VERSION: "15.3"
PGVECTOR_VERSION: "0.4.4"
on:
push:
branches:
- trunk
workflow_dispatch:
jobs:
build-and-publish-image:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- name: Login to the container registry
uses: docker/login-action@v3
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
run: |
docker build --build-arg="POSTGRES_VERSION=${POSTGRES_VERSION}" --build-arg="PGVECTOR_VERSION=${PGVECTOR_VERSION}" --tag "ghcr.io/zapgram/cimg-postgres-pgvector:${POSTGRES_VERSION}-${PGVECTOR_VERSION}" .
- name: Publish image
if: github.ref_name == 'trunk'
run: |
docker push "ghcr.io/zapgram/cimg-postgres-pgvector:${POSTGRES_VERSION}-${PGVECTOR_VERSION}"