Skip to content

Commit 3631503

Browse files
build: update build-and-push.yml.
1 parent 47f9c04 commit 3631503

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

.github/workflows/build-and-push.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
inputs:
88
dockerImageTag:
99
description: 'Image Tag'
10-
default: 'v1.10.6-dev'
10+
default: 'v1.10.7-dev'
1111
required: true
1212
dockerImageTagWithLatest:
1313
description: '是否发布latest tag(正式发版时选择,测试版本切勿选择)'
@@ -36,7 +36,7 @@ on:
3636
jobs:
3737
build-and-push-to-fit2cloud-registry:
3838
if: ${{ contains(github.event.inputs.registry, 'fit2cloud') }}
39-
runs-on: ubuntu-22.04
39+
runs-on: ubuntu-latest
4040
steps:
4141
- name: Check Disk Space
4242
run: df -h
@@ -52,10 +52,6 @@ jobs:
5252
swap-storage: true
5353
- name: Check Disk Space
5454
run: df -h
55-
- name: Set Swap Space
56-
uses: pierotofy/set-swap-space@master
57-
with:
58-
swap-size-gb: 8
5955
- name: Checkout
6056
uses: actions/checkout@v4
6157
with:
@@ -73,13 +69,10 @@ jobs:
7369
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
7470
fi
7571
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 \
7773
${DOCKER_IMAGE_TAGS} .
7874
- name: Set up QEMU
7975
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
8376
- name: Set up Docker Buildx
8477
uses: docker/setup-buildx-action@v3
8578
- name: Login to GitHub Container Registry
@@ -96,11 +89,12 @@ jobs:
9689
password: ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }}
9790
- name: Docker Buildx (build-and-push)
9891
run: |
92+
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
9993
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile
10094
10195
build-and-push-to-dockerhub:
10296
if: ${{ contains(github.event.inputs.registry, 'dockerhub') }}
103-
runs-on: ubuntu-22.04
97+
runs-on: ubuntu-latest
10498
steps:
10599
- name: Check Disk Space
106100
run: df -h
@@ -116,10 +110,6 @@ jobs:
116110
swap-storage: true
117111
- name: Check Disk Space
118112
run: df -h
119-
- name: Set Swap Space
120-
uses: pierotofy/set-swap-space@master
121-
with:
122-
swap-size-gb: 8
123113
- name: Checkout
124114
uses: actions/checkout@v4
125115
with:
@@ -137,13 +127,10 @@ jobs:
137127
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
138128
fi
139129
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 \
141131
${DOCKER_IMAGE_TAGS} .
142132
- name: Set up QEMU
143133
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
147134
- name: Set up Docker Buildx
148135
uses: docker/setup-buildx-action@v3
149136
- name: Login to GitHub Container Registry
@@ -159,4 +146,5 @@ jobs:
159146
password: ${{ secrets.DOCKERHUB_TOKEN }}
160147
- name: Docker Buildx (build-and-push)
161148
run: |
149+
sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
162150
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile

0 commit comments

Comments
 (0)