-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (67 loc) · 2.51 KB
/
docker-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Docker build
on:
push:
branches: [main]
schedule:
- cron: '0 0 */2 * *'
jobs:
arm64v8:
name: Build for arm64v8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480 # Pin 1.2.0
with:
image: tonistiigi/binfmt:latest
platforms: arm64
- name: Set up buildx
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # Pin 1.6.0
with:
install: true
- name: Login to DockerHub
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # Pin 1.14.1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
run: cd arm64v8-debian-11 && docker buildx build --platform linux/arm64 . -t weilbyte/box:arm64v8-debian-11 --push
armv7:
name: Build for armv7
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480
with:
image: tonistiigi/binfmt:latest
platforms: arm
- name: Set up buildx
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # Pin 1.6.0
with:
install: true
- name: Login to DockerHub
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # Pin 1.14.1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build
run: cd armv7-debian-11 && docker buildx build --platform linux/arm/v7 . -t weilbyte/box:armv7-debian-11 --push
manifests:
name: Update manifests
runs-on: ubuntu-latest
needs: [armv7, arm64v8]
steps:
- name: Set up buildx
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25 # Pin 1.6.0
with:
install: true
- name: Login to DockerHub
uses: docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7 # Pin 1.14.1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Update manifests
run: |
docker buildx imagetools create weilbyte/box:armv7-debian-11 weilbyte/box:arm64v8-debian-11 --tag weilbyte/box:debian-11 && \
docker buildx imagetools create weilbyte/box:debian-11 --tag weilbyte/box:latest