@@ -28,13 +28,13 @@ jobs:
2828 id : get-version
2929 run : |
3030 VERSION_PLAIN=$(cat VERSION)
31-
31+
3232 if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
3333 BRANCH_NAME="${{ inputs.branch_name }}"
3434 else
3535 BRANCH_NAME="${{ github.ref_name }}"
3636 fi
37-
37+
3838 if [[ "$BRANCH_NAME" == "release" ]]; then
3939 echo "version=${VERSION_PLAIN}" >> $GITHUB_OUTPUT
4040 echo "version_tag=v${VERSION_PLAIN}" >> $GITHUB_OUTPUT
@@ -61,15 +61,18 @@ jobs:
6161 - build_target : " cpu"
6262 platform : " linux/amd64"
6363 runs_on : " ubuntu-latest"
64- - build_target : " gpu"
64+ - build_target : " gpu"
6565 platform : " linux/amd64"
6666 runs_on : " ubuntu-latest"
6767 - build_target : " cpu"
6868 platform : " linux/arm64"
6969 runs_on : " ubuntu-24.04-arm"
7070 - build_target : " gpu"
71- platform : " linux/arm64"
71+ platform : " linux/arm64"
7272 runs_on : " ubuntu-24.04-arm"
73+ - build_target : " rocm"
74+ platform : " linux/amd64"
75+ runs_on : " ubuntu-latest"
7376 runs-on : ${{ matrix.runs_on }}
7477 steps :
7578 - name : Checkout repository
@@ -118,12 +121,12 @@ jobs:
118121 PLATFORM="${{ matrix.platform }}"
119122 BUILD_TARGET="${{ matrix.build_target }}"
120123 VERSION_TAG="${{ needs.prepare-release.outputs.version_tag }}"
121-
124+
122125 echo "Building ${PLATFORM} image for ${BUILD_TARGET} version ${VERSION_TAG}"
123-
126+
124127 TARGET="${BUILD_TARGET}-$(echo ${PLATFORM} | cut -d'/' -f2)"
125128 echo "Using bake target: $TARGET"
126-
129+
127130 docker buildx bake $TARGET --push --progress=plain
128131
129132 create-manifests :
@@ -137,28 +140,28 @@ jobs:
137140 REPO : ${{ vars.REPO || 'kokoro-fastapi' }}
138141 strategy :
139142 matrix :
140- build_target : ["cpu", "gpu"]
143+ build_target : ["cpu", "gpu", "rocm" ]
141144 steps :
142145 - name : Log in to GitHub Container Registry
143146 uses : docker/login-action@v3
144147 with :
145148 registry : ghcr.io
146149 username : ${{ github.actor }}
147150 password : ${{ secrets.GITHUB_TOKEN }}
148-
151+
149152 - name : Create multi-platform manifest
150153 run : |
151154 VERSION_TAG="${{ needs.prepare-release.outputs.version_tag }}"
152155 TARGET="${{ matrix.build_target }}"
153156 REGISTRY="${{ env.REGISTRY }}"
154157 OWNER="${{ env.OWNER }}"
155158 REPO="${{ env.REPO }}"
156-
159+
157160 docker buildx imagetools create -t \
158161 ${REGISTRY}/${OWNER}/${REPO}-${TARGET}:${VERSION_TAG} \
159162 ${REGISTRY}/${OWNER}/${REPO}-${TARGET}:${VERSION_TAG}-amd64 \
160163 ${REGISTRY}/${OWNER}/${REPO}-${TARGET}:${VERSION_TAG}-arm64
161-
164+
162165 if [[ "$VERSION_TAG" != *"-"* ]]; then
163166 docker buildx imagetools create -t \
164167 ${REGISTRY}/${OWNER}/${REPO}-${TARGET}:latest \
0 commit comments