11name : Build OpenClaw Image
2- run-name : Build OpenClaw Image ${{ github.event.inputs.openclawTag || github.ref_name }}
2+ run-name : Build OpenClaw Image ${{ github.event.inputs.dockerTag || github.event.inputs. openclawTag || github.ref_name }}
33
44on :
55 push :
88 workflow_dispatch :
99 inputs :
1010 openclawTag :
11- default : " 2026.10.5 "
12- description : " OpenClaw release and Docker Hub tag , for example 2026.10.5 "
11+ default : " 2026.10.7 "
12+ description : " Upstream OpenClaw release without v , for example 2026.10.7 "
1313 required : true
14+ dockerTag :
15+ description : " Docker Hub tag; leave empty to use the release (test example: 2026.10.7-feishu-test.1)"
16+ required : false
1417 pushLatest :
15- description : " Push latest tag"
16- default : " true"
18+ description : " Also push latest tag"
19+ type : boolean
20+ default : false
1721 required : true
1822
1923env :
@@ -36,21 +40,33 @@ jobs:
3640 env :
3741 EVENT_NAME : ${{ github.event_name }}
3842 INPUT_OPENCLAW_TAG : ${{ github.event.inputs.openclawTag }}
43+ INPUT_DOCKER_TAG : ${{ github.event.inputs.dockerTag }}
3944 INPUT_PUSH_LATEST : ${{ github.event.inputs.pushLatest }}
4045 REF_NAME : ${{ github.ref_name }}
4146 run : |
4247 set -euo pipefail
4348
4449 if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
4550 openclaw_tag="${INPUT_OPENCLAW_TAG}"
46- push_latest="${INPUT_PUSH_LATEST:-true}"
51+ dockerhub_tag="${INPUT_DOCKER_TAG:-$openclaw_tag}"
52+ push_latest="${INPUT_PUSH_LATEST:-false}"
4753 else
4854 openclaw_tag="${REF_NAME#v}"
55+ dockerhub_tag="$openclaw_tag"
4956 push_latest="true"
5057 fi
5158
52- if [ -z "$openclaw_tag" ]; then
53- echo "::error::Failed to resolve OpenClaw tag"
59+ if [[ ! "$openclaw_tag" =~ ^[0-9]+\.[0-9]+\.[0-9]+([.-][A-Za-z0-9]+)*$ ]]; then
60+ echo "::error::Invalid OpenClaw release; use a version without the v prefix"
61+ exit 1
62+ fi
63+ # Leave room for the -amd64 and -arm64 suffixes within Docker's 128-character limit.
64+ if [[ ! "$dockerhub_tag" =~ ^[A-Za-z0-9_][A-Za-z0-9_.-]{0,121}$ ]] || [ "$dockerhub_tag" = "latest" ]; then
65+ echo "::error::Invalid Docker Hub tag; use a versioned tag and pushLatest for latest"
66+ exit 1
67+ fi
68+ if [ "$push_latest" != "true" ] && [ "$push_latest" != "false" ]; then
69+ echo "::error::pushLatest must be true or false"
5470 exit 1
5571 fi
5672
6682
6783 {
6884 echo "openclaw_tag=$openclaw_tag"
69- echo "dockerhub_tag=$openclaw_tag "
85+ echo "dockerhub_tag=$dockerhub_tag "
7086 echo "push_latest=$push_latest"
7187 echo "source_sha=$source_sha"
7288 echo "built_at=$built_at"
@@ -118,7 +134,7 @@ jobs:
118134 GIT_COMMIT=${{ needs.resolve.outputs.source_sha }}
119135 OPENCLAW_BUILD_TIMESTAMP=${{ needs.resolve.outputs.built_at }}
120136 OPENCLAW_DOCKER_BUILD_VERSION=${{ needs.resolve.outputs.openclaw_tag }}
121- OPENCLAW_EXTENSIONS=diagnostics-otel,codex
137+ OPENCLAW_EXTENSIONS=diagnostics-otel,codex,feishu
122138 OPENCLAW_INSTALL_BROWSER=true
123139 tags : |
124140 ${{ env.IMAGE_NAME }}:${{ needs.resolve.outputs.dockerhub_tag }}-amd64
@@ -171,7 +187,7 @@ jobs:
171187 GIT_COMMIT=${{ needs.resolve.outputs.source_sha }}
172188 OPENCLAW_BUILD_TIMESTAMP=${{ needs.resolve.outputs.built_at }}
173189 OPENCLAW_DOCKER_BUILD_VERSION=${{ needs.resolve.outputs.openclaw_tag }}
174- OPENCLAW_EXTENSIONS=diagnostics-otel,codex
190+ OPENCLAW_EXTENSIONS=diagnostics-otel,codex,feishu
175191 OPENCLAW_INSTALL_BROWSER=true
176192 tags : |
177193 ${{ env.IMAGE_NAME }}:${{ needs.resolve.outputs.dockerhub_tag }}-arm64
0 commit comments