diff --git a/.github/workflows/docker_release.yml b/.github/workflows/docker_release.yml index 71b38321c..a0b66e8e4 100644 --- a/.github/workflows/docker_release.yml +++ b/.github/workflows/docker_release.yml @@ -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