diff --git a/.github/actions/bootstrap/action.yml b/.github/actions/bootstrap/action.yml index 584ae2634d9e..bab5113bc567 100644 --- a/.github/actions/bootstrap/action.yml +++ b/.github/actions/bootstrap/action.yml @@ -4,7 +4,7 @@ inputs: python-version: description: "Version range or exact version of Python or PyPy to use, using SemVer's version range syntax." default: 3.8 - pip-version: + pip-version: description: "Version of pip to be installed using pip" default: 23.3.1 setuptools-version: @@ -13,6 +13,19 @@ inputs: poetry-version: description: "Version of poetry to be installed using pip" default: 1.5.1 +outputs: + python-version: + description: "Version range or exact version of Python or PyPy" + value: ${{ steps.versions.outputs.python-version }} + pip-version: + description: "Installed version of pip" + value: ${{ steps.versions.outputs.pip-version }} + setuptools-version: + description: "Installed version of setuptools" + value: ${{ steps.versions.outputs.setuptools-version }} + poetry-version: + description: "Installed version of poetry" + value: ${{ steps.versions.outputs.poetry-version }} runs: using: "composite" steps: @@ -27,3 +40,10 @@ runs: python -m pip install -U poetry==${{ inputs.poetry-version }} python -m poetry config virtualenvs.create false shell: bash + - id: versions + shell: bash + run: | + echo "python-version=$(echo ${{ inputs.python-version }})" >> $GITHUB_OUTPUT + echo "pip-version=$(echo ${{ inputs.pip-version }})" >> $GITHUB_OUTPUT + echo "setuptools-version=$(echo ${{ inputs.setuptools-version }})" >> $GITHUB_OUTPUT + echo "poetry-version=$(echo ${{ inputs.poetry-version }})" >> $GITHUB_OUTPUT diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e883e53eeaa2..defa57cdb5bc 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,22 +3,19 @@ name: Docker server build on: # workflow_dispatch: # inputs: - # python_version: + # python-version: # description: "Python version" # type: string # required: true - # default: "3.8.0" - # pip_version: + # pip-version: # description: "Pip version" # type: string # required: true - # default: "23.0.1" - # setuptools_version: + # setuptools-version: # description: "Setuptools version" # type: string # required: true - # default: "69.0.2" - # fwlr_version: + # fwlr-version: # description: "Flower version" # type: string # required: true @@ -39,26 +36,31 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 - - name: Login to Docker Hub - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + # - name: Login to Docker Hub + # uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + # with: + # username: ${{ secrets.DOCKERHUB_USERNAME }} + # password: ${{ secrets.DOCKERHUB_TOKEN }} + + - uses: ./.github/actions/bootstrap + id: bootstrap with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + skip-installation: "true" - name: Build and push id: build - uses: docker/build-push-action@v4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 + uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0 with: - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64 #,linux/arm64 context: src/docker/server build-args: | - PYTHON_VERSION=3.8.0 - PIP_VERSION=23.0.1 - SETUPTOOLS_VERSION=69.0.2 + PYTHON_VERSION=${{ steps.bootstrap.outputs.python-version }} + PIP_VERSION=${{ steps.bootstrap.outputs.pip-version }} + SETUPTOOLS_VERSION=${{ steps.bootstrap.outputs.setuptools-version }} FLWR_VERSION=1.6.0 UBUNTU_VERSION=22.04 tags: flwr/server:1.6.0-py38-ubuntu22.04 - push: true + push: false - run: | cat <>${GITHUB_STEP_SUMMARY}