From 6da10ec5c341319e484d03fe008a4553f128a793 Mon Sep 17 00:00:00 2001 From: Grzesiek Kolodziejczyk Date: Fri, 20 Sep 2024 13:41:19 +0200 Subject: [PATCH] Build image on push --- .github/workflows/build-citus.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/build-citus.yml diff --git a/.github/workflows/build-citus.yml b/.github/workflows/build-citus.yml new file mode 100644 index 000000000..80649f8b8 --- /dev/null +++ b/.github/workflows/build-citus.yml @@ -0,0 +1,38 @@ +name: Build and Push Docker Image + +on: + push: + branches: [citus] + pull_request: + branches: [citus] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository_owner }}/pgvector-citus + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile.citus + push: true + tags: | + ghcr.io/${{ github.repository_owner }}/pgvector-citus:latest + ghcr.io/${{ github.repository_owner }}/pgvector-citus:${{ github.sha }}