Skip to content

Commit

Permalink
Try publishing a package
Browse files Browse the repository at this point in the history
  • Loading branch information
rouge8 committed Dec 19, 2023
1 parent 0132be7 commit b15f842
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---

name: Build Docker image
name: Build and publish Docker image

env:
POSTGRES_VERSION: "15.3"
Expand All @@ -13,11 +13,25 @@ on:
workflow_dispatch:

jobs:
build-image:
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}"

0 comments on commit b15f842

Please sign in to comment.