From b1cb3146eb9f1f0861d70ec330b5f7cc948220e6 Mon Sep 17 00:00:00 2001 From: Taiga Takano Date: Sat, 7 Dec 2024 08:21:22 +0900 Subject: [PATCH] support docker hub --- .github/workflows/docker.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 808c460..5c2b287 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -28,15 +28,20 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} + - name: Log in to Docker Hub + if: github.event_name == 'push' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build Docker image run: | docker build -t ghcr.io/${{ github.repository }}:latest . - # docker build -t ghcr.io/${{ github.repository }}_dev:latest --target builder_image . - # docker build -t ghcr.io/${{ github.repository }}:latest --target release_image . - name: Push Docker image if: github.event_name == 'push' run: | docker push ghcr.io/${{ github.repository }}:latest - # docker push ghcr.io/${{ github.repository }}_dev:latest - # docker push ghcr.io/${{ github.repository }}:latest + docker build -t ${{ secrets.DOCKER_USERNAME }}/horus_inference_server:latest . + docker push ${{ secrets.DOCKER_USERNAME }}/horus_inference_server:latest