From d530957b2ccc079d248beea42c0475d690308371 Mon Sep 17 00:00:00 2001 From: makaveli10 Date: Fri, 16 Feb 2024 18:58:57 +0530 Subject: [PATCH] test docker ci on fork --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 156d296..2c4c051 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,31 @@ jobs: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + + build-and-push-docker: + needs: [run-tests, check-code-format] + runs-on: ubuntu-22.04 + if: github.event_name == 'push' && github.ref == 'refs/heads/develop' + steps: + - uses: actions/checkout@v2 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: docker/Dockerfile + push: true + tags: ghcr.io/makaveli10/whisperlive-cpu:latest publish-to-pypi: needs: [run-tests, check-code-format]