[CICD] add simple test step for docker build workflow, fix prefix bug (#821)

# What does this PR do?

**Main Thing**
- Add a simple test step before publishing docker image in workflow

**Side Fix**
- Docker push action fails recently due to extra prefix introduced. E.g.
see:
https://github.com/meta-llama/llama-stack/pull/802#issuecomment-2599507062

cc @terrytangyuan 

## Test Plan

1. Release a TestPyPi version on this code: 0.0.63.dev51206766


3581203331

```
# 1. build docker image
TEST_PYPI_VERSION=0.0.63.dev51206766 llama stack build --template fireworks

# 2. test the docker image
cd distributions/fireworks && docker compose up
```

4. Test the full build + test docker flow using TestPyPi from (1):
1284218494

<img width="1049" alt="image"
src="https://github.com/user-attachments/assets/c025893d-5ce2-48ff-aa90-de00e105ee09"
/>


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
This commit is contained in:
Xi Yan 2025-01-18 15:16:05 -08:00 committed by GitHub
parent 55067fa81d
commit 74f6af8bbe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 47 additions and 13 deletions

View file

@ -23,7 +23,6 @@ special_pip_deps="$6"
set -euo pipefail
build_name="$1"
image_name="distribution-$build_name"
container_base=$2
build_file_path=$3
host_build_dir=$4
@ -184,7 +183,7 @@ else
fi
# Add version tag to image name
image_tag="$image_name:$version_tag"
image_tag="$build_name:$version_tag"
# Detect platform architecture
ARCH=$(uname -m)