-
Notifications
You must be signed in to change notification settings - Fork 40
50 lines (45 loc) · 1.3 KB
/
build-containers.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
name: 'Build docker containers'
on:
push:
branches:
- main
pull_request:
branches:
- main
pull_request_target:
branches:
- main
jobs:
pr-docker-contributor:
name: PR Docker contributor image
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64v8]
steps:
- uses: actions/checkout@v2
- name: Build container for ${{ matrix.arch }}
run: |
sudo apt update; sudo apt install docker-buildx-plugin
cd docker-contributor
docker build --build-arg ARCH=${{ matrix.arch }}/ .
pr-docker-contributor-amd64:
name: PR Docker contributor image (HC amd64)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build container for hardcoded amd64
run: |
cd docker-contributor
docker build --build-arg ARCH=amd64/ .
pr-docker-contributor-arm64:
name: PR Docker contributor image (HC arm64v8)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build container for hardcoded arm64v8
run: |
cat /proc/sys/fs/binfmt_misc/qemu-*
sudo apt update; sudo apt install docker-buildx-plugin
cd docker-contributor
docker build --platform linux/arm64 --build-arg ARCH=arm64v8/ .