From f469f28937bd8da263690f8015da1992cb1947e4 Mon Sep 17 00:00:00 2001 From: David Andlinger Date: Fri, 2 Jun 2023 13:38:38 +0200 Subject: [PATCH] push to ghcr and docker hub --- .github/workflows/build.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2395eb7..d8cf5db 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Log in to container registry + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Log in to GitHub container registry uses: docker/login-action@v2 with: registry: ghcr.io @@ -24,5 +30,12 @@ jobs: with: context: ./6.0 platforms: linux/amd64,linux/arm64 - tags: instant-solutions/mongo:6.0.6,instant-solutions/mongo:6.0,instant-solutions/mongo:6 - push: true \ No newline at end of file + tags: i15s/mongo:6.0.6,i15s/mongo:6.0,i15s/mongo:6 + push: true + - name: Push image to GitHub container registry + run: | + docker buildx imagetools create \ + --tag ghcr.io/instant-solutions/mongo:6.0.6 \ + --tag ghcr.io/instant-solutions/mongo:6.0 \ + --tag ghcr.io/instant-solutions/mongo:6 \ + i15s/mongo:6.0.6 \ No newline at end of file