mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-09-26 16:46:58 +00:00
fix: do not override bake's platform definitions (#4518)
* do not override bake's platform definitions * test * fix job name and remove override from minor version job * test * bump docker login action * fix plurals * Remove platform from matrix and test both platform in a single job * Remove branch trigger used for testing --------- Co-authored-by: Silvano Cerza <silvanocerza@gmail.com>
This commit is contained in:
parent
651be37afc
commit
0dfa5d6ad7
20
.github/workflows/docker_release.yml
vendored
20
.github/workflows/docker_release.yml
vendored
@ -13,16 +13,13 @@ env:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
name: Build ${{ matrix.target }} image for ${{ matrix.platform }}
|
||||
name: Build ${{ matrix.target }} images
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- "cpu"
|
||||
- "gpu"
|
||||
platform:
|
||||
- "linux/amd64"
|
||||
- "linux/arm64"
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -35,7 +32,7 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
||||
@ -46,7 +43,7 @@ jobs:
|
||||
with:
|
||||
images: $DOCKER_REPO_NAME
|
||||
|
||||
- name: Build base image
|
||||
- name: Build base images
|
||||
uses: docker/bake-action@v2
|
||||
env:
|
||||
IMAGE_TAG_SUFFIX: ${{ steps.meta.outputs.version }}
|
||||
@ -60,14 +57,19 @@ jobs:
|
||||
run: |
|
||||
EXPECTED_VERSION=$(cat VERSION.txt)
|
||||
TAG="base-${{ matrix.target }}-${{ steps.meta.outputs.version }}"
|
||||
PLATFORM="${{ matrix.platform }}"
|
||||
|
||||
PLATFORM="linux/amd64"
|
||||
VERSION=$(docker run --platform "$PLATFORM" --rm "deepset/haystack:$TAG" python -c"import haystack; print(haystack.__version__)")
|
||||
[[ "$VERSION" = "$EXPECTED_VERSION" ]] || echo "::error 'Haystack version in deepset/haystack:$TAG image for $PLATFORM is different from expected'"
|
||||
|
||||
PLATFORM="linux/arm64"
|
||||
VERSION=$(docker run --platform "$PLATFORM" --rm "deepset/haystack:$TAG" python -c"import haystack; print(haystack.__version__)")
|
||||
[[ "$VERSION" = "$EXPECTED_VERSION" ]] || echo "::error 'Haystack version in deepset/haystack:$TAG image for $PLATFORM is different from expected'"
|
||||
|
||||
# Remove image after test to avoid filling the GitHub runner and prevent its failure
|
||||
docker rmi "deepset/haystack:$TAG"
|
||||
|
||||
- name: Build api image
|
||||
- name: Build api images
|
||||
uses: docker/bake-action@v2
|
||||
env:
|
||||
IMAGE_TAG_SUFFIX: ${{ steps.meta.outputs.version }}
|
||||
@ -76,7 +78,6 @@ jobs:
|
||||
workdir: docker
|
||||
targets: ${{ matrix.target }}
|
||||
push: true
|
||||
set: "*.platform=${{ matrix.platform }}"
|
||||
|
||||
- name: Get latest version of Haystack
|
||||
id: latest-version
|
||||
@ -111,4 +112,3 @@ jobs:
|
||||
workdir: docker
|
||||
targets: ${{ matrix.target }}-latest
|
||||
push: true
|
||||
set: "*.platform=${{ matrix.platform }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user