Skip to content

Commit b13c32e

Browse files
authored
Merge pull request #380 from docker/promote-release
ci: add workflow to promote docker/model-runner image version to latest
2 parents 093c652 + 1b38946 commit b13c32e

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Promote docker/model-runner to latest
2+
run-name: Promote docker/model-runner version ${{ inputs.version }} to latest
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
version:
8+
description: 'version'
9+
required: true
10+
type: string
11+
12+
jobs:
13+
release:
14+
if: github.actor == 'doringeman' || github.actor == 'xenoscopic' || github.actor == 'ericcurtin' || github.actor == 'ilopezluna'
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Set up Crane
18+
run: |
19+
curl -LO https://github.com/google/go-containerregistry/releases/latest/download/go-containerregistry_Linux_x86_64.tar.gz
20+
tar -xzvf go-containerregistry_Linux_x86_64.tar.gz crane
21+
sudo mv crane /usr/local/bin/
22+
crane version
23+
24+
- name: Log in to DockerHub
25+
env:
26+
DOCKERHUB_USERNAME: ${{ vars.DOCKERBUILDBOT_USERNAME }}
27+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERBUILDBOT_WRITE_PAT }}
28+
run: crane auth login index.docker.io -u "$DOCKERHUB_USERNAME" -p "$DOCKERHUB_TOKEN"
29+
30+
- name: Promote CPU images
31+
run: |
32+
echo "Promoting CPU images"
33+
crane tag "docker/model-runner:${{ inputs.version }}" "latest"
34+
35+
- name: Promote CUDA images
36+
run: |
37+
echo "Promoting CUDA images"
38+
crane tag "docker/model-runner:${{ inputs.version }}-cuda" "latest-cuda"
39+
40+
- name: Promote vLLM CUDA images
41+
run: |
42+
echo "Promoting vLLM CUDA images"
43+
crane tag "docker/model-runner:${{ inputs.version }}-vllm-cuda" "latest-vllm-cuda"
44+
45+
- name: Promote ROCm images
46+
run: |
47+
echo "Promoting ROCm images"
48+
crane tag "docker/model-runner:${{ inputs.version }}-rocm" "latest-rocm"
49+
50+
- name: Promote MUSA images
51+
run: |
52+
echo "Checking if MUSA image exists"
53+
if crane manifest "docker/model-runner:${{ inputs.version }}-musa" > /dev/null 2>&1; then
54+
echo "Promoting MUSA images"
55+
crane tag "docker/model-runner:${{ inputs.version }}-musa" "latest-musa"
56+
else
57+
echo "MUSA image does not exist, skipping"
58+
fi
59+
60+
- name: Promote CANN images
61+
run: |
62+
echo "Checking if CANN image exists"
63+
if crane manifest "docker/model-runner:${{ inputs.version }}-cann" > /dev/null 2>&1; then
64+
echo "Promoting CANN images"
65+
crane tag "docker/model-runner:${{ inputs.version }}-cann" "latest-cann"
66+
else
67+
echo "CANN image does not exist, skipping"
68+
fi

0 commit comments

Comments
 (0)