Skip to content

Commit b8e57be

Browse files
authored
chore: enhance Docker workflows with Buildx and QEMU setup (#307)
- Added Docker Buildx and QEMU setup steps to docker-publish, docker-release, and precommit-publish workflows. - Specified target platforms (linux/amd64, linux/arm64) for Docker builds in respective workflows. These changes improve multi-platform support for Docker images. Signed-off-by: liuhy <[email protected]>
1 parent 76a5a42 commit b8e57be

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.github/workflows/docker-publish.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ jobs:
2828
- name: Check out the repo
2929
uses: actions/checkout@v4
3030

31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
36+
3137
- name: Log in to GitHub Container Registry
3238
uses: docker/login-action@v3
3339
with:
@@ -48,6 +54,7 @@ jobs:
4854
with:
4955
context: .
5056
file: ./Dockerfile.extproc
57+
platforms: linux/amd64,linux/arm64
5158
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
5259
tags: |
5360
${{ inputs.is_nightly == true && format('ghcr.io/{0}/semantic-router/extproc:nightly-{1}', env.REPOSITORY_OWNER_LOWER, steps.date.outputs.date_tag) || format('ghcr.io/{0}/semantic-router/extproc:{1}', env.REPOSITORY_OWNER_LOWER, github.sha) }}
@@ -63,6 +70,12 @@ jobs:
6370
- name: Check out the repo
6471
uses: actions/checkout@v4
6572

73+
- name: Set up Docker Buildx
74+
uses: docker/setup-buildx-action@v3
75+
76+
- name: Set up QEMU
77+
uses: docker/setup-qemu-action@v3
78+
6679
- name: Log in to GitHub Container Registry
6780
uses: docker/login-action@v3
6881
with:
@@ -89,6 +102,7 @@ jobs:
89102
with:
90103
context: ./e2e-tests/llm-katan
91104
file: ./e2e-tests/llm-katan/Dockerfile
105+
platforms: linux/amd64,linux/arm64
92106
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
93107
tags: |
94108
${{ inputs.is_nightly == true && format('ghcr.io/{0}/semantic-router/llm-katan:nightly-{1}', env.REPOSITORY_OWNER_LOWER, steps.date.outputs.date_tag) || format('ghcr.io/{0}/semantic-router/llm-katan:{1}', env.REPOSITORY_OWNER_LOWER, github.sha) }}

.github/workflows/docker-release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ jobs:
1616
- name: Check out the repo
1717
uses: actions/checkout@v4
1818

19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v3
24+
1925
- name: Extract tag name
2026
id: extract_tag
2127
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
@@ -35,6 +41,7 @@ jobs:
3541
with:
3642
context: .
3743
file: ./Dockerfile.extproc
44+
platforms: linux/amd64,linux/arm64
3845
push: true
3946
tags: |
4047
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/extproc:${{ steps.extract_tag.outputs.tag }}
@@ -50,6 +57,12 @@ jobs:
5057
- name: Check out the repo
5158
uses: actions/checkout@v4
5259

60+
- name: Set up Docker Buildx
61+
uses: docker/setup-buildx-action@v3
62+
63+
- name: Set up QEMU
64+
uses: docker/setup-qemu-action@v3
65+
5366
- name: Extract tag name
5467
id: extract_tag
5568
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
@@ -75,6 +88,7 @@ jobs:
7588
with:
7689
context: ./e2e-tests/llm-katan
7790
file: ./e2e-tests/llm-katan/Dockerfile
91+
platforms: linux/amd64,linux/arm64
7892
push: true
7993
tags: |
8094
ghcr.io/${{ env.REPOSITORY_OWNER_LOWER }}/semantic-router/llm-katan:${{ steps.extract_tag.outputs.tag }}

.github/workflows/precommit-publish.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ jobs:
1919
- name: Check out the repo
2020
uses: actions/checkout@v4
2121

22+
- name: Set up Docker Buildx
23+
uses: docker/setup-buildx-action@v3
24+
25+
- name: Set up QEMU
26+
uses: docker/setup-qemu-action@v3
27+
2228
- name: Set lowercase repository owner
2329
run: echo "REPOSITORY_OWNER_LOWER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
2430

@@ -39,6 +45,7 @@ jobs:
3945
with:
4046
context: .
4147
file: ./Dockerfile.precommit
48+
platforms: linux/amd64,linux/arm64
4249
push: ${{ github.event_name != 'pull_request' }} # Only push on merge to main, not on PRs
4350
tags: |
4451
${{ inputs.is_nightly != true && format('ghcr.io/{0}/semantic-router/precommit:latest', env.REPOSITORY_OWNER_LOWER) || '' }}

0 commit comments

Comments
 (0)