Skip to content

Commit

Permalink
Fix build of docker base image (#2705)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-Steiner authored Dec 15, 2023
1 parent 346b595 commit 316bbdb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/_docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
name: Build server image
runs-on: ubuntu-22.04
timeout-minutes: 60
outputs:
build-id: ${{ steps.build-id.outputs.id }}
strategy:
fail-fast: true
matrix:
Expand All @@ -48,6 +50,17 @@ jobs:
{ qemu: "arm64", docker: "linux/arm64" },
]
steps:
- name: Create build id
id: build-id
shell: python
run: |
import hashlib
import os
hash = hashlib.sha256('''${{ inputs.build-args }}'''.encode())
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
print(f"id={hash.hexdigest()}", file=fh)
- name: Set up QEMU
if: matrix.platform.qemu != ''
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
Expand Down Expand Up @@ -87,7 +100,7 @@ jobs:
- name: Upload digest
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: digests
name: digests-${{ steps.build-id.outputs.id }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
Expand All @@ -103,7 +116,7 @@ jobs:
- name: Download digests
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: digests
name: digests-${{ needs.build.outputs.build-id }}
path: /tmp/digests

- name: Docker meta
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
uses: ./.github/workflows/_docker-build.yml
needs: parameters
strategy:
fail-fast: true
fail-fast: false
matrix:
python-version: [3.8, 3.9, 3.10, 3.11]
python-version: ["3.8", "3.9", "3.10", "3.11"]
with:
namespace-repository: flwr/base
file-dir: src/docker/base
Expand Down

0 comments on commit 316bbdb

Please sign in to comment.