diff --git a/.github/workflows/docker-serverapp.yml b/.github/workflows/docker-serverapp.yml new file mode 100644 index 000000000000..531ef079c641 --- /dev/null +++ b/.github/workflows/docker-serverapp.yml @@ -0,0 +1,52 @@ +name: Build docker ServerApp image + +on: + workflow_dispatch: + inputs: + flwr-version: + description: "Version of Flower." + required: true + type: string + +permissions: + contents: read + +jobs: + build-serverapp-images: + name: Build images + uses: ./.github/workflows/_docker-build.yml + # run only on default branch when using it with workflow_dispatch + if: github.ref_name == github.event.repository.default_branch + strategy: + fail-fast: false + matrix: + image: [ + { + py-version: "3.8", + tags: "${{ github.event.inputs.flwr-version }}-py3.8-ubuntu22.04" + }, + { + py-version: "3.9", + tags: "${{ github.event.inputs.flwr-version }}-py3.9-ubuntu22.04" + }, + { + py-version: "3.10", + tags: "${{ github.event.inputs.flwr-version }}-py3.10-ubuntu22.04" + }, + { + py-version: "3.11", + # those are two tags -py3.11-py3.11-ubuntu22.04 and separated by a \n + tags: "${{ github.event.inputs.flwr-version }}-py3.11-ubuntu22.04\n${{ github.event.inputs.flwr-version }}" + }, + ] + with: + namespace-repository: flwr/serverapp + file-dir: src/docker/serverapp + build-args: | + FLWR_VERSION=${{ github.event.inputs.flwr-version }} + PYTHON_VERSION=${{ matrix.image.py-version }} + UBUNTU_VERSION=ubuntu22.04 + tags: ${{ matrix.image.tags }} + secrets: + dockerhub-user: ${{ secrets.DOCKERHUB_USERNAME }} + dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}