From 2fd0339bb01d14aa62db5b4a1faaf4b053ec7872 Mon Sep 17 00:00:00 2001 From: xihajun Date: Mon, 30 Oct 2023 21:55:48 +0000 Subject: [PATCH] Update docker push --- .github/workflows/docker-push.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/docker-push.yml diff --git a/.github/workflows/docker-push.yml b/.github/workflows/docker-push.yml new file mode 100644 index 0000000000..d64446c1f9 --- /dev/null +++ b/.github/workflows/docker-push.yml @@ -0,0 +1,36 @@ +name: Build and Push Docker Image with Custom Steps + +on: + push: + branches: + - main # or the branch you want to trigger the action + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3s + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Run Custom Commands + run: | + ln -s docker/{Dockerfile,docker-compose.yml,.dockerignore} . + cp docker/.env.example .env + # echo "TORCH_CUDA_ARCH_LIST=Your_GPU_Model" >> .env # Replace 'Your_GPU_Model' with your specific GPU model + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: xihajun/text-generation-webui:latest # replace with your Docker Hub username and repository name