From bcf02449b37f4f9221c0685428d1abf4b9794fb0 Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 4 Jan 2024 02:32:29 -0500 Subject: [PATCH] ci(dockerhub): push images also to dockerhub (#1542) Signed-off-by: Ettore Di Giacinto --- .github/workflows/image.yml | 12 ++++++++---- .github/workflows/image_build.yml | 17 +++++++++++++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml index 705a5478..5fe86590 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/image.yml @@ -27,8 +27,10 @@ jobs: platforms: ${{ matrix.platforms }} runs-on: ${{ matrix.runs-on }} secrets: - dockerUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }} - dockerPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }} + dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }} + dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }} + quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }} + quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }} strategy: # Pushing with all jobs in parallel # eats the bandwidth of all the nodes @@ -107,8 +109,10 @@ jobs: platforms: ${{ matrix.platforms }} runs-on: ${{ matrix.runs-on }} secrets: - dockerUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }} - dockerPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }} + dockerUsername: ${{ secrets.DOCKERHUB_USERNAME }} + dockerPassword: ${{ secrets.DOCKERHUB_PASSWORD }} + quayUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }} + quayPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }} strategy: matrix: include: diff --git a/.github/workflows/image_build.yml b/.github/workflows/image_build.yml index 34cb25a8..8358502b 100644 --- a/.github/workflows/image_build.yml +++ b/.github/workflows/image_build.yml @@ -46,6 +46,10 @@ on: required: true dockerPassword: required: true + quayUsername: + required: true + quayPassword: + required: true jobs: reusable_image-build: runs-on: ${{ inputs.runs-on }} @@ -100,7 +104,9 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: quay.io/go-skynet/local-ai + images: | + quay.io/go-skynet/local-ai + localai/localai tags: | type=ref,event=branch type=semver,pattern={{raw}} @@ -122,10 +128,17 @@ jobs: if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: - registry: quay.io username: ${{ secrets.dockerUsername }} password: ${{ secrets.dockerPassword }} + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.quayUsername }} + password: ${{ secrets.quayPassword }} + - name: Build and push uses: docker/build-push-action@v5 with: