File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 23
23
description : ' 空间名称'
24
24
required : true
25
25
default : ' dockerhub_mirror'
26
-
26
+ TARGET_ARCH :
27
+ description : ' 平台 amd64(默认)、arm64、arm/v7'
28
+ required : false
27
29
jobs :
28
30
build :
29
31
runs-on : ubuntu-latest
@@ -35,11 +37,15 @@ jobs:
35
37
36
38
- name : Pull, tag, and push Docker image
37
39
run : |
38
- docker pull ${{ github.event.inputs.IMAGE_NAME }}:${{ github.event.inputs.IMAGE_VERSION }}
40
+ if [ "${{ github.event.inputs.TARGET_ARCH }}" != "" ]; then
41
+ docker pull --platform ${{ github.event.inputs.TARGET_ARCH }} ${{ github.event.inputs.IMAGE_NAME }}:${{ github.event.inputs.IMAGE_VERSION }}
42
+ else
43
+ docker pull ${{ github.event.inputs.IMAGE_NAME }}:${{ github.event.inputs.IMAGE_VERSION }}
44
+ fi
39
45
docker tag ${{ github.event.inputs.IMAGE_NAME }}:${{ github.event.inputs.IMAGE_VERSION }} ${{ github.event.inputs.TARGET_REGISTRY }}/${{ github.event.inputs.TARGET_REPOSITORY }}/${{ github.event.inputs.NEW_NAME }}:${{ github.event.inputs.IMAGE_VERSION }}
40
46
docker push ${{ github.event.inputs.TARGET_REGISTRY }}/${{ github.event.inputs.TARGET_REPOSITORY }}/${{ github.event.inputs.NEW_NAME }}:${{ github.event.inputs.IMAGE_VERSION }}
41
47
42
- - name : qyweixin send message
48
+ - name : qyweixin send message
43
49
if : ${{ env.QYWX_ROBOT_URL != '' }}
44
50
uses : chf007/action-wechat-work@master
45
51
env :
You can’t perform that action at this time.
0 commit comments