-
Notifications
You must be signed in to change notification settings - Fork 1
105 lines (102 loc) · 2.96 KB
/
ci.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: meta-macchina-docker-ci
on: [push, workflow_dispatch]
jobs:
docker-build-amd64:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Login to hub.docker.com
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build Docker Image
run: docker build . -t macchina/edge-ce:latest-amd64
-
name: Push Docker Image
run: docker push macchina/edge-ce:latest-amd64
docker-build-arm32v7:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Available Platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Login to hub.docker.com
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build Docker Image
run: |
docker buildx build \
--platform linux/arm/v7 \
--output "type=image,push=true" \
--tag macchina/edge-ce:latest-arm32v7 \
--file ./Dockerfile .
docker-build-arm64v8:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker buildx
id: buildx
uses: docker/setup-buildx-action@v1
-
name: Available Platforms
run: echo ${{ steps.buildx.outputs.platforms }}
-
name: Login to hub.docker.com
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Build Docker Image
run: |
docker buildx build \
--platform linux/arm64 \
--output "type=image,push=true" \
--tag macchina/edge-ce:latest-arm64v8 \
--file ./Dockerfile .
docker-manifest:
runs-on: ubuntu-20.04
needs: ["docker-build-amd64", "docker-build-arm32v7", "docker-build-arm64v8"]
steps:
-
name: Login to hub.docker.com
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Create Manifest
run: |
docker manifest create \
macchina/edge-ce:latest \
--amend macchina/edge-ce:latest-amd64 \
--amend macchina/edge-ce:latest-arm32v7 \
--amend macchina/edge-ce:latest-arm64v8
-
name: Publish Manifest
run: docker manifest push macchina/edge-ce:latest