Skip to content

Commit 24de2f8

Browse files
authored
ci: add 'kiro' variant to PR Preview Build with :pr<N>-kiro tag (#1302)
Adds 'kiro' as a variant choice that builds with BUILD_MODE=unified (all platform features) and tags the image as :pr<N>-kiro instead of the plain :pr<N>. This distinguishes unified/kiro preview builds from default ones in the registry. Also adds tag_suffix support so future variants can customize their tag pattern without changing the image name. Co-authored-by: chaodu-agent <chaodu-agent@users.noreply.github.com>
1 parent 2778249 commit 24de2f8

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

.github/workflows/pr-preview.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
type: choice
1414
options:
1515
- default
16+
- kiro
1617
- unified
1718
- agentcore
1819
- antigravity
@@ -45,6 +46,7 @@ jobs:
4546
dockerfile: ${{ steps.df.outputs.file }}
4647
suffix: ${{ steps.df.outputs.suffix }}
4748
build_args: ${{ steps.df.outputs.build_args }}
49+
tag_suffix: ${{ steps.df.outputs.tag_suffix }}
4850
steps:
4951
- name: Get PR branch
5052
id: pr
@@ -62,6 +64,13 @@ jobs:
6264
echo "file=Dockerfile" >> "$GITHUB_OUTPUT"
6365
echo "suffix=" >> "$GITHUB_OUTPUT"
6466
echo "build_args=" >> "$GITHUB_OUTPUT"
67+
echo "tag_suffix=" >> "$GITHUB_OUTPUT"
68+
elif [ "${{ inputs.variant }}" = "kiro" ]; then
69+
# Unified build (all platforms) tagged as :pr<N>-kiro
70+
echo "file=Dockerfile" >> "$GITHUB_OUTPUT"
71+
echo "suffix=" >> "$GITHUB_OUTPUT"
72+
echo "build_args=BUILD_MODE=unified" >> "$GITHUB_OUTPUT"
73+
echo "tag_suffix=-kiro" >> "$GITHUB_OUTPUT"
6574
elif [ "${{ inputs.variant }}" = "unified" ]; then
6675
# Same base Dockerfile as "default", but built with BUILD_MODE=unified
6776
# so the telegram/line/feishu/wecom/googlechat/teams gateway adapters
@@ -73,10 +82,12 @@ jobs:
7382
echo "file=Dockerfile" >> "$GITHUB_OUTPUT"
7483
echo "suffix=" >> "$GITHUB_OUTPUT"
7584
echo "build_args=BUILD_MODE=unified" >> "$GITHUB_OUTPUT"
85+
echo "tag_suffix=" >> "$GITHUB_OUTPUT"
7686
else
7787
echo "file=Dockerfile.${{ inputs.variant }}" >> "$GITHUB_OUTPUT"
7888
echo "suffix=-${{ inputs.variant }}" >> "$GITHUB_OUTPUT"
7989
echo "build_args=" >> "$GITHUB_OUTPUT"
90+
echo "tag_suffix=" >> "$GITHUB_OUTPUT"
8091
fi
8192
8293
build:
@@ -155,5 +166,5 @@ jobs:
155166
run: |
156167
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}${{ needs.resolve-pr.outputs.suffix }}"
157168
docker buildx imagetools create \
158-
-t "${IMAGE}:pr${{ inputs.pr_number }}" \
169+
-t "${IMAGE}:pr${{ inputs.pr_number }}${{ needs.resolve-pr.outputs.tag_suffix }}" \
159170
$(printf "${IMAGE}@sha256:%s " $(ls /tmp/digests/))

0 commit comments

Comments
 (0)