Skip to content

Commit a9932c3

Browse files
authored
Merge pull request #56 from Zoey2936/patch-1
build arm on native arm runner to improve build speed
2 parents 59773b7 + 1de901d commit a9932c3

File tree

1 file changed

+45
-28
lines changed

1 file changed

+45
-28
lines changed

.github/workflows/build_images.yml

+45-28
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,11 @@ on:
88
workflow_dispatch:
99

1010
jobs:
11-
build:
11+
build-amd64:
1212
runs-on: ubuntu-latest
13-
1413
strategy:
1514
fail-fast: false
1615
matrix:
17-
platform: [
18-
{arch: 'linux/amd64', tag: 'develop'},
19-
{arch: 'linux/arm64', tag: 'develop-arm64'}]
2016
container: [
2117
{name: 'aio-apache', context: './Containers/apache'},
2218
{name: 'aio-borgbackup', context: './Containers/borgbackup'},
@@ -35,41 +31,62 @@ jobs:
3531
{name: 'aio-talk-recording', context: './Containers/talk-recording'},
3632
{name: 'aio-fulltextsearch', context: './Containers/fulltextsearch'},
3733
{name: 'aio-docker-socket-proxy', context: './Containers/docker-socket-proxy'},
38-
{name: 'aio-whiteboard', context: './Containers/whiteboard'}]
39-
exclude:
40-
- platform: {arch: 'linux/arm64', tag: 'develop-arm64'}
41-
container: {name: 'aio-clamav', context: './Containers/clamav'}
42-
34+
{name: 'aio-whiteboard', context: './Containers/whiteboard'}
35+
]
4336
steps:
4437
- name: Check out the repo
4538
uses: actions/checkout@v3
46-
47-
- name: Set up QEMU
48-
uses: docker/setup-qemu-action@v2
49-
50-
- name: Set up Docker Buildx
51-
uses: docker/setup-buildx-action@v2
52-
5339
- name: Login to DockerHub
5440
uses: docker/login-action@v2
5541
with:
5642
username: ${{ secrets.DOCKERHUB_USERNAME }}
5743
password: ${{ secrets.DOCKERHUB_TOKEN }}
58-
59-
- name: Docker metadata
60-
id: metadata
61-
uses: docker/metadata-action@v4
44+
- name: Build docker image and push to dockerhub
45+
uses: docker/build-push-action@v4
6246
with:
63-
images: |
64-
nextcloud/${{ matrix.container.name }}
65-
tags: |
66-
${{ matrix.platform.tag }}
67-
47+
context: ${{ matrix.container.context }}
48+
platforms: linux/amd64
49+
no-cache: true
50+
push: true
51+
tags: nextcloud/${{ matrix.container.name }}:develop
52+
53+
build-arm64:
54+
runs-on: ubuntu-24.04-arm
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
container: [
59+
{name: 'aio-apache', context: './Containers/apache'},
60+
{name: 'aio-borgbackup', context: './Containers/borgbackup'},
61+
{name: 'aio-collabora', context: './Containers/collabora'},
62+
{name: 'aio-domaincheck', context: './Containers/domaincheck'},
63+
{name: 'all-in-one', context: './Containers/mastercontainer'},
64+
{name: 'aio-nextcloud', context: './Containers/nextcloud'},
65+
{name: 'aio-notify-push', context: './Containers/notify-push'},
66+
{name: 'aio-postgresql', context: './Containers/postgresql'},
67+
{name: 'aio-redis', context: './Containers/redis'},
68+
{name: 'aio-talk', context: './Containers/talk'},
69+
{name: 'aio-watchtower', context: './Containers/watchtower'},
70+
{name: 'aio-onlyoffice', context: './Containers/onlyoffice'},
71+
{name: 'aio-imaginary', context: './Containers/imaginary'},
72+
{name: 'aio-talk-recording', context: './Containers/talk-recording'},
73+
{name: 'aio-fulltextsearch', context: './Containers/fulltextsearch'},
74+
{name: 'aio-docker-socket-proxy', context: './Containers/docker-socket-proxy'},
75+
{name: 'aio-whiteboard', context: './Containers/whiteboard'}
76+
]
77+
steps:
78+
- name: Check out the repo
79+
uses: actions/checkout@v3
80+
- name: Login to DockerHub
81+
uses: docker/login-action@v2
82+
with:
83+
username: ${{ secrets.DOCKERHUB_USERNAME }}
84+
password: ${{ secrets.DOCKERHUB_TOKEN }}
6885
- name: Build docker image and push to dockerhub
6986
uses: docker/build-push-action@v4
7087
with:
7188
context: ${{ matrix.container.context }}
72-
platforms: ${{matrix.platform.arch}}
89+
platforms: linux/arm64
7390
no-cache: true
7491
push: true
75-
tags: ${{ steps.metadata.outputs.tags }}
92+
tags: nextcloud/${{ matrix.container.name }}:develop-arm64

0 commit comments

Comments
 (0)