Skip to content

Commit a0263e8

Browse files
committed
push to ghcr
1 parent ad2fa92 commit a0263e8

File tree

1 file changed

+48
-53
lines changed

1 file changed

+48
-53
lines changed

.github/workflows/pg-image-build.yml

Lines changed: 48 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
push:
1616
branches:
1717
- main
18+
- ghcr
1819
paths:
1920
- "extension/**"
2021
- "images/vectorize-pg/**"
@@ -25,12 +26,9 @@ on:
2526
jobs:
2627
build_and_push_amd64:
2728
name: Build and push AMD64 images
28-
if: github.repository_owner == 'tembo-io'
29+
if: github.repository_owner == 'ChuckHend'
2930
runs-on:
30-
- "runs-on=${{ github.run_id }}-build-push-amd64"
31-
- "runner=large-amd64"
32-
- "cpu=8"
33-
- "ram=16"
31+
- ubuntu-latest
3432
outputs:
3533
short_sha: ${{ steps.versions.outputs.SHORT_SHA }}
3634
steps:
@@ -57,41 +55,39 @@ jobs:
5755
- name: Set up Docker Buildx
5856
uses: docker/setup-buildx-action@v3
5957

60-
- name: Login to Quay
58+
- name: Login to GitHub Container Registry
6159
uses: docker/login-action@v2
6260
with:
63-
registry: quay.io/tembo
64-
username: ${{ secrets.QUAY_USER_TEMBO }}
65-
password: ${{ secrets.QUAY_PASSWORD_TEMBO }}
61+
registry: ghcr.io
62+
username: ${{ github.actor }}
63+
password: ${{ secrets.GITHUB_TOKEN }}
64+
6665
- name: Build and push -- Commit
6766
# push commit build when not a release
6867
if: github.event_name != 'release'
6968
run: |
7069
docker build \
7170
--build-arg PGRX_VER=${{ steps.versions.outputs.PGRX_VER }} \
7271
-f ./images/vectorize-pg/Dockerfile \
73-
-t quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-amd64 .
74-
docker push quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-amd64
72+
-t ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-amd64 .
73+
docker push ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-amd64
7574
7675
- name: Build and push -- Release
7776
if: github.event_name == 'release'
7877
run: |
7978
docker build \
8079
--build-arg PGRX_VER=${{ steps.versions.outputs.PGRX_VER }} \
8180
-f ./images/vectorize-pg/Dockerfile \
82-
-t quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-amd64 \
83-
-t quay.io/tembo/vectorize-pg:latest-amd64 .
84-
docker push quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-amd64
85-
docker push quay.io/tembo/vectorize-pg:latest-amd64
81+
-t ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-amd64 \
82+
-t ghcr.io/chuckhend/vectorize-pg:latest-amd64 .
83+
docker push ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-amd64
84+
docker push ghcr.io/chuckhend/vectorize-pg:latest-amd64
8685
8786
build_and_push_arm64:
8887
name: Build and push ARM64 images
89-
if: github.repository_owner == 'tembo-io'
88+
if: github.repository_owner == 'ChuckHend'
9089
runs-on:
91-
- "runs-on=${{ github.run_id }}-build-push-arm64"
92-
- "runner=large-arm64"
93-
- "cpu=8"
94-
- "ram=16"
90+
- ubuntu-latest
9591
outputs:
9692
short_sha: ${{ steps.versions.outputs.SHORT_SHA }}
9793
steps:
@@ -121,12 +117,12 @@ jobs:
121117
- name: Set up Docker Buildx
122118
uses: docker/setup-buildx-action@v3
123119

124-
- name: Login to Quay
120+
- name: Login to GitHub Container Registry
125121
uses: docker/login-action@v2
126122
with:
127-
registry: quay.io/tembo
128-
username: ${{ secrets.QUAY_USER_TEMBO }}
129-
password: ${{ secrets.QUAY_PASSWORD_TEMBO }}
123+
registry: ghcr.io
124+
username: ${{ github.actor }}
125+
password: ${{ secrets.GITHUB_TOKEN }}
130126

131127
- name: Build and push -- Commit
132128
# push commit build when not a release
@@ -136,8 +132,8 @@ jobs:
136132
--build-arg PGRX_VER=${{ steps.versions.outputs.PGRX_VER }} \
137133
-f ./images/vectorize-pg/Dockerfile \
138134
--platform linux/arm64 \
139-
-t quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-arm64 .
140-
docker push quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-arm64
135+
-t ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-arm64 .
136+
docker push ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-arm64
141137
142138
- name: Build and push -- Release
143139
if: github.event_name == 'release'
@@ -146,14 +142,13 @@ jobs:
146142
--build-arg PGRX_VER=${{ steps.versions.outputs.PGRX_VER }} \
147143
-f ./images/vectorize-pg/Dockerfile \
148144
--platform linux/arm64 \
149-
-t quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-arm64 \
150-
-t quay.io/tembo/vectorize-pg:latest-arm64 .
151-
docker push quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-arm64
152-
docker push quay.io/tembo/vectorize-pg:latest-arm64
145+
-t ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-arm64 \
146+
-t ghcr.io/chuckhend/vectorize-pg:latest-arm64 .
147+
docker push ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-arm64
148+
docker push ghcr.io/chuckhend/vectorize-pg:latest-arm64
153149
154150
create_manifest:
155151
name: Create and Push Manifest
156-
157152
runs-on: ubuntu-latest
158153
needs: [build_and_push_arm64, build_and_push_amd64]
159154
outputs:
@@ -163,12 +158,12 @@ jobs:
163158
- name: Set up Docker Buildx
164159
uses: docker/setup-buildx-action@v3
165160

166-
- name: Login to Quay
161+
- name: Login to GitHub Container Registry
167162
uses: docker/login-action@v2
168163
with:
169-
registry: quay.io/tembo
170-
username: ${{ secrets.QUAY_USER_TEMBO }}
171-
password: ${{ secrets.QUAY_PASSWORD_TEMBO }}
164+
registry: ghcr.io
165+
username: ${{ github.actor }}
166+
password: ${{ secrets.GITHUB_TOKEN }}
172167

173168
- name: Checkout
174169
uses: actions/checkout@v4
@@ -195,29 +190,29 @@ jobs:
195190
- name: Create and push Docker manifest -- Commit
196191
if: github.event_name != 'release'
197192
run: |
198-
docker manifest create quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }} \
199-
quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-arm64 \
200-
quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-amd64
193+
docker manifest create ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }} \
194+
ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-arm64 \
195+
ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-amd64
201196
202-
docker manifest annotate quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }} quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-arm64 --arch arm64 --os linux
203-
docker manifest annotate quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }} quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-amd64 --arch amd64 --os linux
204-
docker manifest push quay.io/tembo/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}
197+
docker manifest annotate ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }} ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-arm64 --arch arm64 --os linux
198+
docker manifest annotate ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }} ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}-amd64 --arch amd64 --os linux
199+
docker manifest push ghcr.io/chuckhend/vectorize-pg:${{ steps.versions.outputs.SHORT_SHA }}
205200
206201
- name: Create and push Docker manifest -- Release
207202
if: github.event_name == 'release'
208203
run: |
209-
docker manifest create quay.io/tembo/vectorize-pg:latest \
210-
quay.io/tembo/vectorize-pg:latest-arm64 \
211-
quay.io/tembo/vectorize-pg:latest-amd64
204+
docker manifest create ghcr.io/chuckhend/vectorize-pg:latest \
205+
ghcr.io/chuckhend/vectorize-pg:latest-arm64 \
206+
ghcr.io/chuckhend/vectorize-pg:latest-amd64
212207
213-
docker manifest annotate quay.io/tembo/vectorize-pg:latest quay.io/tembo/vectorize-pg:latest-arm64 --arch arm64 --os linux
214-
docker manifest annotate quay.io/tembo/vectorize-pg:latest quay.io/tembo/vectorize-pg:latest-amd64 --arch amd64 --os linux
215-
docker manifest push quay.io/tembo/vectorize-pg:latest
208+
docker manifest annotate ghcr.io/chuckhend/vectorize-pg:latest ghcr.io/chuckhend/vectorize-pg:latest-arm64 --arch arm64 --os linux
209+
docker manifest annotate ghcr.io/chuckhend/vectorize-pg:latest ghcr.io/chuckhend/vectorize-pg:latest-amd64 --arch amd64 --os linux
210+
docker manifest push ghcr.io/chuckhend/vectorize-pg:latest
216211
217-
docker manifest create quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }} \
218-
quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-arm64 \
219-
quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-amd64
212+
docker manifest create ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }} \
213+
ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-arm64 \
214+
ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-amd64
220215
221-
docker manifest annotate quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }} quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-arm64 --arch arm64 --os linux
222-
docker manifest annotate quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }} quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-amd64 --arch amd64 --os linux
223-
docker manifest push quay.io/tembo/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}
216+
docker manifest annotate ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }} ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-arm64 --arch arm64 --os linux
217+
docker manifest annotate ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }} ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}-amd64 --arch amd64 --os linux
218+
docker manifest push ghcr.io/chuckhend/vectorize-pg:v${{ steps.versions.outputs.TAG_VER }}

0 commit comments

Comments
 (0)