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