Skip to content

Commit bcf0244

Browse files
authored
ci(dockerhub): push images also to dockerhub (#1542)
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent d48faf3 commit bcf0244

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

.github/workflows/image.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ jobs:
2727
platforms: ${{ matrix.platforms }}
2828
runs-on: ${{ matrix.runs-on }}
2929
secrets:
30-
dockerUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
31-
dockerPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
30+
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
31+
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
32+
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
33+
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
3234
strategy:
3335
# Pushing with all jobs in parallel
3436
# eats the bandwidth of all the nodes
@@ -107,8 +109,10 @@ jobs:
107109
platforms: ${{ matrix.platforms }}
108110
runs-on: ${{ matrix.runs-on }}
109111
secrets:
110-
dockerUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
111-
dockerPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
112+
dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }}
113+
dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }}
114+
quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
115+
quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
112116
strategy:
113117
matrix:
114118
include:

.github/workflows/image_build.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ on:
4646
required: true
4747
dockerPassword:
4848
required: true
49+
quayUsername:
50+
required: true
51+
quayPassword:
52+
required: true
4953
jobs:
5054
reusable_image-build:
5155
runs-on: ${{ inputs.runs-on }}
@@ -100,7 +104,9 @@ jobs:
100104
id: meta
101105
uses: docker/metadata-action@v5
102106
with:
103-
images: quay.io/go-skynet/local-ai
107+
images: |
108+
quay.io/go-skynet/local-ai
109+
localai/localai
104110
tags: |
105111
type=ref,event=branch
106112
type=semver,pattern={{raw}}
@@ -122,10 +128,17 @@ jobs:
122128
if: github.event_name != 'pull_request'
123129
uses: docker/login-action@v3
124130
with:
125-
registry: quay.io
126131
username: ${{ secrets.dockerUsername }}
127132
password: ${{ secrets.dockerPassword }}
128133

134+
- name: Login to DockerHub
135+
if: github.event_name != 'pull_request'
136+
uses: docker/login-action@v3
137+
with:
138+
registry: quay.io
139+
username: ${{ secrets.quayUsername }}
140+
password: ${{ secrets.quayPassword }}
141+
129142
- name: Build and push
130143
uses: docker/build-push-action@v5
131144
with:

0 commit comments

Comments
 (0)