3636jobs :
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
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,19 +69,12 @@ 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
85- with :
86- buildkitd-config-inline : |
87- [worker.oci]
88- max-parallelism = 1
8978 - name : Login to GitHub Container Registry
9079 uses : docker/login-action@v3
9180 with :
@@ -100,11 +89,12 @@ jobs:
10089 password : ${{ secrets.FIT2CLOUD_REGISTRY_PASSWORD }}
10190 - name : Docker Buildx (build-and-push)
10291 run : |
92+ sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
10393 docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile
10494
10595 build-and-push-to-dockerhub :
10696 if : ${{ contains(github.event.inputs.registry, 'dockerhub') }}
107- runs-on : ubuntu-22.04
97+ runs-on : ubuntu-latest
10898 steps :
10999 - name : Check Disk Space
110100 run : df -h
@@ -120,10 +110,6 @@ jobs:
120110 swap-storage : true
121111 - name : Check Disk Space
122112 run : df -h
123- - name : Set Swap Space
124- uses : pierotofy/set-swap-space@master
125- with :
126- swap-size-gb : 8
127113 - name : Checkout
128114 uses : actions/checkout@v4
129115 with :
@@ -141,19 +127,12 @@ jobs:
141127 DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME}"
142128 fi
143129 echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} --memory-swap -1 \
144- --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 \
145131 ${DOCKER_IMAGE_TAGS} .
146132 - name : Set up QEMU
147133 uses : docker/setup-qemu-action@v3
148- with :
149- # Until https://github.com/tonistiigi/binfmt/issues/215
150- image : tonistiigi/binfmt:qemu-v7.0.0-28
151134 - name : Set up Docker Buildx
152135 uses : docker/setup-buildx-action@v3
153- with :
154- buildkitd-config-inline : |
155- [worker.oci]
156- max-parallelism = 1
157136 - name : Login to GitHub Container Registry
158137 uses : docker/login-action@v3
159138 with :
@@ -167,4 +146,5 @@ jobs:
167146 password : ${{ secrets.DOCKERHUB_TOKEN }}
168147 - name : Docker Buildx (build-and-push)
169148 run : |
149+ sudo sync && echo 3 | sudo tee /proc/sys/vm/drop_caches && free -m
170150 docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} -f installer/Dockerfile
0 commit comments