@@ -76,19 +76,25 @@ jobs:
7676 username : ${{ github.actor }}
7777 password : ${{ secrets.GITHUB_TOKEN }}
7878
79- - name : Extract metadata
79+ - name : Compute canonical image name (lowercase for GHCR)
80+ id : vars
81+ run : |
82+ CANONICAL="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
83+ echo "canonical=${CANONICAL,,}" >> "$GITHUB_OUTPUT"
84+
85+ - name : Extract metadata (Manager image)
8086 id : meta
8187 uses : docker/metadata-action@v5
8288 with :
83- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
89+ images : ${{ steps.vars.outputs.canonical }}
8490 tags : |
8591 type=ref,event=tag
8692 type=semver,pattern={{version}}
8793 type=semver,pattern={{major}}.{{minor}}
8894 type=semver,pattern={{major}}
8995 type=raw,value=latest,enable=true
9096
91- - name : Build and push Docker image
97+ - name : Build and push Manager Docker image
9298 uses : docker/build-push-action@v6
9399 with :
94100 context : .
@@ -102,6 +108,25 @@ jobs:
102108 cache-to : type=gha,mode=max
103109 platforms : linux/amd64,linux/arm64
104110
111+ - name : Prepare Runner tags (same image, tag suffix -runner)
112+ id : runner-tags
113+ run : |
114+ echo "tags<<EOF" >> "$GITHUB_OUTPUT"
115+ echo "${{ steps.meta.outputs.tags }}" | sed '/./s/\(:.*\)$/\1-runner/' >> "$GITHUB_OUTPUT"
116+ echo "EOF" >> "$GITHUB_OUTPUT"
117+
118+ - name : Build and push Runner Docker image (container mode)
119+ uses : docker/build-push-action@v6
120+ with :
121+ context : .
122+ file : ./Dockerfile.runner
123+ push : true
124+ tags : ${{ steps.runner-tags.outputs.tags }}
125+ labels : ${{ steps.meta.outputs.labels }}
126+ cache-from : type=gha
127+ cache-to : type=gha,mode=max
128+ platforms : linux/amd64,linux/arm64
129+
105130 - name : Create Release
106131 uses : softprops/action-gh-release@v2
107132 with :
@@ -116,8 +141,13 @@ jobs:
116141
117142 ### Docker 镜像 (GHCR)
118143
144+ - Manager(管理服务):
145+ ```bash
146+ docker pull ${{ steps.vars.outputs.canonical }}:${{ steps.version.outputs.tag }}
147+ ```
148+ - Runner 容器镜像(容器模式,同镜像名,tag 带 -runner 后缀):
119149 ```bash
120- docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.version.outputs.tag }}
150+ docker pull ${{ steps.vars.outputs.canonical }}:${{ steps.version.outputs.tag }}-runner
121151 ```
122152
123153 ### 二进制
0 commit comments