Skip to content

Commit 01115af

Browse files
authored
ghcr for vector-serve (#225)
* ghcr for vector-serve
1 parent 48984dd commit 01115af

5 files changed

Lines changed: 43 additions & 75 deletions

File tree

.github/workflows/build-vector-serve.yml

Lines changed: 38 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ on:
1818
permissions:
1919
id-token: write
2020
contents: read
21+
packages: write
2122

2223
defaults:
2324
run:
@@ -47,11 +48,7 @@ jobs:
4748

4849
build_and_push_amd64:
4950
name: Build and push AMD64 images
50-
runs-on:
51-
- "runs-on=${{ github.run_id }}-build-push-amd64"
52-
- "runner=large-amd64"
53-
- "cpu=8"
54-
- "ram=16"
51+
runs-on: ubuntu-latest
5552
outputs:
5653
short_sha: ${{ steps.versions.outputs.SHORT_SHA }}
5754
steps:
@@ -64,59 +61,31 @@ jobs:
6461
- name: Set up Docker Buildx
6562
uses: docker/setup-buildx-action@v3
6663

67-
- name: Login to Quay
64+
- name: Login to GHCR
6865
uses: docker/login-action@v2
6966
with:
70-
registry: quay.io/tembo
71-
username: ${{ secrets.QUAY_USER_TEMBO }}
72-
password: ${{ secrets.QUAY_PASSWORD_TEMBO }}
67+
registry: ghcr.io
68+
username: ${{ github.actor }}
69+
password: ${{ secrets.GITHUB_TOKEN }}
7370

7471
- name: Build and push -- Commit
7572
run: |
7673
docker build \
7774
-f ./vector-serve/Dockerfile \
78-
-t quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-amd64 .
79-
docker push quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-amd64
75+
-t ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-amd64 .
76+
docker push ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-amd64
8077
8178
- name: Build and push -- Release
82-
if: github.ref == 'refs/heads/main'
79+
# if: github.ref == 'refs/heads/main'
8380
run: |
8481
docker build \
8582
-f ./vector-serve/Dockerfile \
86-
-t quay.io/tembo/vector-serve:latest-amd64 .
87-
docker push quay.io/tembo/vector-serve:latest-amd64
88-
89-
- name: ECR Build and push -- Commit
90-
uses: aws-actions/configure-aws-credentials@v4
91-
with:
92-
role-to-assume: ${{ secrets.GHA_IAM_ROLE }}
93-
role-session-name: images-gha-docker-build-and-push
94-
aws-region: ${{ secrets.AWS_REGION }}
95-
96-
- name: Login to Amazon ECR
97-
id: login-ecr
98-
uses: aws-actions/amazon-ecr-login@v2
99-
100-
- name: Build and push
101-
uses: docker/build-push-action@v6
102-
with:
103-
file: ./vector-serve/Dockerfile
104-
context: ./
105-
platforms: linux/amd64
106-
push: true
107-
tags: |
108-
${{ secrets.ECR_REGISTRY }}/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}
109-
cache-from: type=local,src=/tmp/.buildx-cache
110-
cache-to: type=local,dest=/tmp/.buildx-cache
111-
provenance: false
83+
-t ghcr.io/chuckhend/vector-serve:latest-amd64 .
84+
docker push ghcr.io/chuckhend/vector-serve:latest-amd64
11285
11386
build_and_push_arm64:
11487
name: Build and push ARM64 images
115-
runs-on:
116-
- "runs-on=${{ github.run_id }}-build-push-arm64"
117-
- "runner=large-arm64"
118-
- "cpu=8"
119-
- "ram=16"
88+
runs-on: ubicloud-standard-2-arm-ubuntu-2204
12089
outputs:
12190
short_sha: ${{ steps.versions.outputs.SHORT_SHA }}
12291
steps:
@@ -130,33 +99,32 @@ jobs:
13099
- name: Set up Docker Buildx
131100
uses: docker/setup-buildx-action@v3
132101

133-
- name: Login to Quay
102+
- name: Login to GHCR
134103
uses: docker/login-action@v2
135104
with:
136-
registry: quay.io/tembo
137-
username: ${{ secrets.QUAY_USER_TEMBO }}
138-
password: ${{ secrets.QUAY_PASSWORD_TEMBO }}
105+
registry: ghcr.io
106+
username: ${{ github.actor }}
107+
password: ${{ secrets.GITHUB_TOKEN }}
139108

140109
- name: Build and push -- Commit
141110
run: |
142111
docker build \
143112
-f ./vector-serve/Dockerfile \
144113
--platform linux/arm64 \
145-
-t quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-arm64 .
146-
docker push quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-arm64
114+
-t ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-arm64 .
115+
docker push ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-arm64
147116
148117
- name: Build and push -- Release
149-
if: github.ref == 'refs/heads/main'
118+
# if: github.ref == 'refs/heads/main'
150119
run: |
151120
docker build \
152121
-f ./vector-serve/Dockerfile \
153122
--platform linux/arm64 \
154-
-t quay.io/tembo/vector-serve:latest-arm64 .
155-
docker push quay.io/tembo/vector-serve:latest-arm64
123+
-t ghcr.io/chuckhend/vector-serve:latest-arm64 .
124+
docker push ghcr.io/chuckhend/vector-serve:latest-arm64
156125
157126
create_manifest:
158127
name: Create and Push Manifest
159-
160128
runs-on: ubuntu-latest
161129
needs: [build_and_push_arm64, build_and_push_amd64]
162130
outputs:
@@ -166,12 +134,12 @@ jobs:
166134
- name: Checkout
167135
uses: actions/checkout@v4
168136

169-
- name: Login to Quay
137+
- name: Login to GHCR
170138
uses: docker/login-action@v2
171139
with:
172-
registry: quay.io/tembo
173-
username: ${{ secrets.QUAY_USER_TEMBO }}
174-
password: ${{ secrets.QUAY_PASSWORD_TEMBO }}
140+
registry: ghcr.io
141+
username: ${{ github.actor }}
142+
password: ${{ secrets.GITHUB_TOKEN }}
175143

176144
- name: Set up Docker Buildx
177145
uses: docker/setup-buildx-action@v3
@@ -183,23 +151,23 @@ jobs:
183151
- name: Create and push Docker manifest -- Commit
184152
run: |
185153
docker manifest create \
186-
quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }} \
187-
quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-arm64 \
188-
quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-amd64
154+
ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }} \
155+
ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-arm64 \
156+
ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-amd64
189157
190-
docker manifest annotate quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }} quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-arm64 --arch arm64 --os linux
191-
docker manifest annotate quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }} quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-amd64 --arch amd64 --os linux
192-
docker manifest push quay.io/tembo/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}
158+
docker manifest annotate ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }} ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-arm64 --arch arm64 --os linux
159+
docker manifest annotate ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }} ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}-amd64 --arch amd64 --os linux
160+
docker manifest push ghcr.io/chuckhend/vector-serve:${{ steps.versions.outputs.SHORT_SHA }}
193161
194162
- name: Create and push Docker manifest -- latest (main)
195163
# only push latest off main
196-
if: github.ref == 'refs/heads/main'
164+
# if: github.ref == 'refs/heads/main'
197165
run: |
198166
docker manifest create \
199-
quay.io/tembo/vector-serve:latest \
200-
quay.io/tembo/vector-serve:latest-arm64 \
201-
quay.io/tembo/vector-serve:latest-amd64
167+
ghcr.io/chuckhend/vector-serve:latest \
168+
ghcr.io/chuckhend/vector-serve:latest-arm64 \
169+
ghcr.io/chuckhend/vector-serve:latest-amd64
202170
203-
docker manifest annotate quay.io/tembo/vector-serve:latest quay.io/tembo/vector-serve:latest-arm64 --arch arm64 --os linux
204-
docker manifest annotate quay.io/tembo/vector-serve:latest quay.io/tembo/vector-serve:latest-amd64 --arch amd64 --os linux
205-
docker manifest push quay.io/tembo/vector-serve:latest
171+
docker manifest annotate ghcr.io/chuckhend/vector-serve:latest ghcr.io/chuckhend/vector-serve:latest-arm64 --arch arm64 --os linux
172+
docker manifest annotate ghcr.io/chuckhend/vector-serve:latest ghcr.io/chuckhend/vector-serve:latest-amd64 --arch amd64 --os linux
173+
docker manifest push ghcr.io/chuckhend/vector-serve:latest

.github/workflows/extension_ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
runs-on: ubuntu-24.04
5050
services:
5151
vector-serve:
52-
image: quay.io/tembo/vector-serve:latest
52+
image: ghcr.io/chuckhend/vector-serve:latest
5353
ports:
5454
- 3000:3000
5555
steps:
@@ -89,7 +89,7 @@ jobs:
8989
services:
9090
# Label used to access the service container
9191
vector-serve:
92-
image: quay.io/tembo/vector-serve:latest
92+
image: ghcr.io/chuckhend/vector-serve:latest
9393
ports:
9494
- 3000:3000
9595
steps:

.github/workflows/extension_upgrade.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-24.04
2020
services:
2121
vector-serve:
22-
image: quay.io/tembo/vector-serve:latest
22+
image: ghcr.io/chuckhend/vector-serve:latest
2323
ports:
2424
- 3000:3000
2525
steps:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cargo pgrx init
2525
### 2. Set up Docker container
2626

2727
```bash
28-
docker run -d -p 3000:3000 quay.io/tembo/vector-serve:latest
28+
docker run -d -p 3000:3000 ghcr.io/chuckhend/vector-serve:latest
2929
```
3030

3131
Confirm a successful set up by running the following:

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
- POSTGRES_PASSWORD=postgres
99
vector-serve:
1010
restart: always
11-
image: quay.io/tembo/vector-serve:latest
11+
image: ghcr.io/chuckhend/vector-serve:latest
1212
ports:
1313
- 3000:3000
1414
ollama-serve:

0 commit comments

Comments
 (0)