Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 30 additions & 44 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ on:
default: false
releaseTag:
description: "Release tag"
required: false
required: true
type: string
default: "test"
llamaServerVersion:
description: "llama-server version"
required: false
Expand All @@ -40,6 +39,18 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Summary
run: |
echo "## Release Parameters" >> $GITHUB_STEP_SUMMARY
echo "| Parameter | Value |" >> $GITHUB_STEP_SUMMARY
echo "|-----------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Release Tag | \`${{ inputs.releaseTag }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Push Latest | \`${{ inputs.pushLatest }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| llama-server Version | \`${{ inputs.llamaServerVersion }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| vLLM Version | \`${{ inputs.vllmVersion }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| SGLang Version | \`${{ inputs.sglangVersion }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Build MUSA/CANN | \`${{ inputs.buildMusaCann }}\` |" >> $GITHUB_STEP_SUMMARY
Comment on lines +42 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (bug_risk): Quote GITHUB_STEP_SUMMARY when appending to avoid issues with spaces or special characters in the path.

To avoid potential issues if GITHUB_STEP_SUMMARY ever contains spaces or special characters, please use >> "$GITHUB_STEP_SUMMARY" in these lines, consistent with how "$GITHUB_OUTPUT" is handled elsewhere.

Suggested change
- name: Summary
run: |
echo "## Release Parameters" >> $GITHUB_STEP_SUMMARY
echo "| Parameter | Value |" >> $GITHUB_STEP_SUMMARY
echo "|-----------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Release Tag | \`${{ inputs.releaseTag }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Push Latest | \`${{ inputs.pushLatest }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| llama-server Version | \`${{ inputs.llamaServerVersion }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| vLLM Version | \`${{ inputs.vllmVersion }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| SGLang Version | \`${{ inputs.sglangVersion }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Build MUSA/CANN | \`${{ inputs.buildMusaCann }}\` |" >> $GITHUB_STEP_SUMMARY
- name: Summary
run: |
echo "## Release Parameters" >> "$GITHUB_STEP_SUMMARY"
echo "| Parameter | Value |" >> "$GITHUB_STEP_SUMMARY"
echo "|-----------|-------|" >> "$GITHUB_STEP_SUMMARY"
echo "| Release Tag | \`${{ inputs.releaseTag }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| Push Latest | \`${{ inputs.pushLatest }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| llama-server Version | \`${{ inputs.llamaServerVersion }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| vLLM Version | \`${{ inputs.vllmVersion }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| SGLang Version | \`${{ inputs.sglangVersion }}\` |" >> "$GITHUB_STEP_SUMMARY"
echo "| Build MUSA/CANN | \`${{ inputs.buildMusaCann }}\` |" >> "$GITHUB_STEP_SUMMARY"


- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

Expand All @@ -63,48 +74,23 @@ jobs:
id: tags
shell: bash
run: |
echo "cpu<<EOF" >> "$GITHUB_OUTPUT"
echo "docker/model-runner:${{ inputs.releaseTag }}" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.pushLatest }}" == "true" ]; then
echo "docker/model-runner:latest" >> "$GITHUB_OUTPUT"
fi
echo 'EOF' >> "$GITHUB_OUTPUT"
echo "cuda<<EOF" >> "$GITHUB_OUTPUT"
echo "docker/model-runner:${{ inputs.releaseTag }}-cuda" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.pushLatest }}" == "true" ]; then
echo "docker/model-runner:latest-cuda" >> "$GITHUB_OUTPUT"
fi
echo 'EOF' >> "$GITHUB_OUTPUT"
echo "vllm-cuda<<EOF" >> "$GITHUB_OUTPUT"
echo "docker/model-runner:${{ inputs.releaseTag }}-vllm-cuda" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.pushLatest }}" == "true" ]; then
echo "docker/model-runner:latest-vllm-cuda" >> "$GITHUB_OUTPUT"
fi
echo 'EOF' >> "$GITHUB_OUTPUT"
echo "sglang-cuda<<EOF" >> "$GITHUB_OUTPUT"
echo "docker/model-runner:${{ inputs.releaseTag }}-sglang-cuda" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.pushLatest }}" == "true" ]; then
echo "docker/model-runner:latest-sglang-cuda" >> "$GITHUB_OUTPUT"
fi
echo 'EOF' >> "$GITHUB_OUTPUT"
echo "rocm<<EOF" >> "$GITHUB_OUTPUT"
echo "docker/model-runner:${{ inputs.releaseTag }}-rocm" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.pushLatest }}" == "true" ]; then
echo "docker/model-runner:latest-rocm" >> "$GITHUB_OUTPUT"
fi
echo 'EOF' >> "$GITHUB_OUTPUT"
echo "musa<<EOF" >> "$GITHUB_OUTPUT"
echo "docker/model-runner:${{ inputs.releaseTag }}-musa" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.pushLatest }}" == "true" ]; then
echo "docker/model-runner:latest-musa" >> "$GITHUB_OUTPUT"
fi
echo 'EOF' >> "$GITHUB_OUTPUT"
echo "cann<<EOF" >> "$GITHUB_OUTPUT"
echo "docker/model-runner:${{ inputs.releaseTag }}-cann" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.pushLatest }}" == "true" ]; then
echo "docker/model-runner:latest-cann" >> "$GITHUB_OUTPUT"
fi
echo 'EOF' >> "$GITHUB_OUTPUT"
format_tags() {
local variant="$1"
local suffix="${variant:+-$variant}" # empty for cpu, "-variant" otherwise
echo "${variant:-cpu}<<EOF" >> "$GITHUB_OUTPUT"
echo "docker/model-runner:${{ inputs.releaseTag }}${suffix}" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.pushLatest }}" == "true" ]; then
echo "docker/model-runner:latest${suffix}" >> "$GITHUB_OUTPUT"
fi
echo 'EOF' >> "$GITHUB_OUTPUT"
}
format_tags "" # cpu
format_tags "cuda"
format_tags "vllm-cuda"
format_tags "sglang-cuda"
format_tags "rocm"
format_tags "musa"
format_tags "cann"

- name: Log in to DockerHub
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
Expand Down
Loading