Skip to content

Commit

Permalink
get versions from bootstrap action
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Steiner committed Dec 4, 2023
1 parent e96e364 commit c3ccbbb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
22 changes: 21 additions & 1 deletion .github/actions/bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
36 changes: 19 additions & 17 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <<EOT >>${GITHUB_STEP_SUMMARY}
Expand Down

0 comments on commit c3ccbbb

Please sign in to comment.