Skip to content

feat: able to customize worker' images #102

feat: able to customize worker' images

feat: able to customize worker' images #102

name: Build pgvector images
on:
pull_request:
branches: [main]
push:
branches: [main]
paths:
- 'deploy/pgvector/Dockerfile'
workflow_dispatch:
# see deploy/pgvector/README.md first
env:
TAG: 16.1.0-debian-11-r18-pgvector-v0.5.1
jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
config-inline: |
[worker.oci]
max-parallelism = 1
- name: Login to the dockerhub Registry only push
if: github.event_name == 'push'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: only Build image
if: github.event_name != 'push'
uses: docker/build-push-action@v5
with:
context: deploy/pgvector
file: deploy/pgvector/Dockerfile
platforms: linux/amd64
tags: |
kubeagi/postgresql:latest
kubeagi/postgresql:${{ env.TAG }}
push: false
load: true
- name: Build and export to Docker
if: github.event_name == 'push'
uses: docker/build-push-action@v5
with:
context: deploy/pgvector
file: deploy/pgvector/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
kubeagi/postgresql:latest
kubeagi/postgresql:${{ env.TAG }}
push: true