-
Notifications
You must be signed in to change notification settings - Fork 82
52 lines (42 loc) · 1.5 KB
/
devel_image.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
---
name: Publish devel image
on:
push:
branches: [devel]
jobs:
release:
runs-on: ubuntu-latest
name: Push devel image
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# setup qemu and buildx
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install build dependencies
run: |
pip install build
# we will first build the image for x86 and load it on the host for testing
- name: Build Image
run: |
export CONTAINERCMD="docker buildx"
export EXTRA_OPTS="--platform linux/amd64 --load"
make container REPO=quay.io/${{ github.repository }} TAG=devel
- name: Test Image
run: docker run --rm quay.io/${{ github.repository }}:devel receptor --version
- name: Login To Quay
uses: docker/login-action@v2
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}
registry: quay.io/${{ github.repository }}
# Since x86 image is built in previous step
# buildx will use cached image, hence overall time will not be affected
- name: Build Multiarch Image & Push To Quay
run: |
export CONTAINERCMD="docker buildx"
export EXTRA_OPTS="--platform linux/amd64,linux/ppc64le,linux/arm64 --push"
make container REPO=quay.io/${{ github.repository }} TAG=devel