diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 1fd9902..ac35a71 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -39,3 +39,28 @@ jobs: - name: Run Flask tests run: | poetry run pytest + build: + strategy: + fail-fast: false + matrix: + python-version: [3.11] + poetry-version: [1.4] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop' + needs: tests + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v4 + with: + push: true + tags: simple2b/open-law-dev:latest