pgvector datum embeddings (#437) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Builds and publishes a docker image for the back end database. | |
on: | |
push: | |
paths: | |
- database/** | |
- .github/workflows/pg-docker.yml | |
branches: [main] | |
permissions: | |
id-token: write | |
contents: read | |
packages: write | |
jobs: | |
build-and-publish-docker-postgres: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./database | |
env: | |
IMAGE_NAME: ghcr.io/striveworks/valor/pgvalor | |
IMAGE_NAME_WITH_COMMIT_HASH: ${IMAGE_NAME}:${{ github.sha }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build | |
run: | | |
docker build . -t ${IMAGE_NAME} | |
- name: push | |
run: | | |
docker push ${IMAGE_NAME} | |
IMAGE_NAME_WITH_COMMIT_HASH=${IMAGE_NAME}:${{ github.sha }} | |
docker tag ${IMAGE_NAME} ${IMAGE_NAME_WITH_COMMIT_HASH} | |
docker push ${IMAGE_NAME_WITH_COMMIT_HASH} | |
- name: push git tag | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
TAG=$(git describe --tags --abbrev=0) | |
docker tag ${IMAGE_NAME} ${IMAGE_NAME}:${TAG} | |
docker push ${IMAGE_NAME}:${TAG} |