7
7
inputs :
8
8
dockerImageTag :
9
9
description : ' Image Tag'
10
- default : ' v1.10.6 -dev'
10
+ default : ' v1.10.7 -dev'
11
11
required : true
12
12
dockerImageTagWithLatest :
13
13
description : ' 是否发布latest tag(正式发版时选择,测试版本切勿选择)'
36
36
jobs :
37
37
build-and-push-to-fit2cloud-registry :
38
38
if : ${{ contains(github.event.inputs.registry, 'fit2cloud') }}
39
- runs-on : ubuntu-22.04
39
+ runs-on : ubuntu-latest
40
40
steps :
41
41
- name : Check Disk Space
42
42
run : df -h
52
52
swap-storage : true
53
53
- name : Check Disk Space
54
54
run : df -h
55
- - name : Set Swap Space
56
- uses : pierotofy/set-swap-space@master
57
- with :
58
- swap-size-gb : 8
59
55
- name : Checkout
60
56
uses : actions/checkout@v4
61
57
with :
@@ -73,13 +69,10 @@ jobs:
73
69
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
74
70
fi
75
71
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --memory-swap -1 \
76
- --build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=${GITHUB_SHA::8} --no-cache \
72
+ --build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=`git rev-parse --short HEAD` --no-cache \
77
73
${DOCKER_IMAGE_TAGS} .
78
74
- name : Set up QEMU
79
75
uses : docker/setup-qemu-action@v3
80
- with :
81
- # Until https://github.com/tonistiigi/binfmt/issues/215
82
- image : tonistiigi/binfmt:qemu-v7.0.0-28
83
76
- name : Set up Docker Buildx
84
77
uses : docker/setup-buildx-action@v3
85
78
- name : Login to GitHub Container Registry
@@ -96,11 +89,12 @@ jobs:
96
89
password : ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }}
97
90
- name : Docker Buildx (build-and-push)
98
91
run : |
92
+ sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
99
93
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile
100
94
101
95
build-and-push-to-dockerhub :
102
96
if : ${{ contains(github.event.inputs.registry, 'dockerhub') }}
103
- runs-on : ubuntu-22.04
97
+ runs-on : ubuntu-latest
104
98
steps :
105
99
- name : Check Disk Space
106
100
run : df -h
@@ -116,10 +110,6 @@ jobs:
116
110
swap-storage : true
117
111
- name : Check Disk Space
118
112
run : df -h
119
- - name : Set Swap Space
120
- uses : pierotofy/set-swap-space@master
121
- with :
122
- swap-size-gb : 8
123
113
- name : Checkout
124
114
uses : actions/checkout@v4
125
115
with :
@@ -137,13 +127,10 @@ jobs:
137
127
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
138
128
fi
139
129
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --memory-swap -1 \
140
- --build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=${GITHUB_SHA::8} --no-cache \
130
+ --build-arg DOCKER_IMAGE_TAG=${{ github.event.inputs.dockerImageTag }} --build-arg BUILD_AT=$(TZ=Asia/Shanghai date +'%Y-%m-%dT%H:%M') --build-arg GITHUB_COMMIT=`git rev-parse --short HEAD` --no-cache \
141
131
${DOCKER_IMAGE_TAGS} .
142
132
- name : Set up QEMU
143
133
uses : docker/setup-qemu-action@v3
144
- with :
145
- # Until https://github.com/tonistiigi/binfmt/issues/215
146
- image : tonistiigi/binfmt:qemu-v7.0.0-28
147
134
- name : Set up Docker Buildx
148
135
uses : docker/setup-buildx-action@v3
149
136
- name : Login to GitHub Container Registry
@@ -159,4 +146,5 @@ jobs:
159
146
password : ${{ secrets.DOCKERHUB_TOKEN }}
160
147
- name : Docker Buildx (build-and-push)
161
148
run : |
149
+ sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
162
150
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile
0 commit comments