mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-06 03:57:19 +00:00
Add load arg to docker/bake-action before testing Docker images (#4124)
This commit is contained in:
parent
27aaa92800
commit
d9a7e8011f
13
.github/workflows/docker_release.yml
vendored
13
.github/workflows/docker_release.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- 'v[0-9].[0-9]+.[0-9]+*'
|
||||
- "v[0-9].[0-9]+.[0-9]+*"
|
||||
|
||||
env:
|
||||
DOCKER_REPO_NAME: deepset/haystack
|
||||
@ -45,18 +45,20 @@ jobs:
|
||||
with:
|
||||
workdir: docker
|
||||
targets: base
|
||||
load: true
|
||||
push: true
|
||||
|
||||
- name: Test base images
|
||||
run: |
|
||||
EXPECTED_VERSION=$(cat VERSION.txt)
|
||||
function test_image {
|
||||
local TAG=$1
|
||||
local PLATFORM=$2
|
||||
local VERSION=$(docker run --platform $PLATFORM --rm deepset/haystack:$TAG python -c"import haystack; print(haystack.__version__)")
|
||||
local TAG, PLATFORM, VERSION
|
||||
TAG=$1
|
||||
PLATFORM=$2
|
||||
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
|
||||
docker rmi "deepset/haystack:$TAG"
|
||||
}
|
||||
test_image base-cpu-${{ steps.meta.outputs.version }} linux/amd64
|
||||
test_image base-gpu-${{ steps.meta.outputs.version }} linux/amd64
|
||||
@ -104,6 +106,7 @@ jobs:
|
||||
with:
|
||||
workdir: docker
|
||||
targets: api-latest
|
||||
load: true
|
||||
push: true
|
||||
|
||||
- name: Test api image no version in tag
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user