47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Build pgvector image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
REGISTRY: gcr.io/devops-lab-cluster
|
|
IMAGE_NAME: postgres-pgvector
|
|
IMAGE_TAG: "15.2-0.8.0"
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Authenticate to GCR
|
|
uses: google-github-actions/auth@v2
|
|
with:
|
|
workload_identity_provider: "projects/*/locations/*/workloadIdentityPools/*/providers/*"
|
|
service_account: "github-deployer@devops-lab-cluster.iam.gserviceaccount.com"
|
|
token_format: access_token
|
|
|
|
- name: Docker Login to GCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: gcr.io
|
|
username: _oauth2
|
|
password: ${{ steps.auth.outputs.access_token }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push pgvector image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: apps/base/customer1/hermes-db
|
|
file: apps/base/customer1/hermes-db/Dockerfile.postgres-pgvector
|
|
push: true
|
|
tags: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}"
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|