Skip to content

Commit 22f006f

Browse files
authored
Add multi-arch support for arm64/amd64 builds (#100)
1 parent a8576e4 commit 22f006f

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/recreate-image.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
recreate-oct-container-image:
1212
name: Create new OCT container image
13-
runs-on: ubuntu-20.04
13+
runs-on: ubuntu-22.04
1414
env:
1515
SHELL: /bin/bash
1616

@@ -21,8 +21,10 @@ jobs:
2121
ref: main
2222
token: ${{ secrets.PULL_TOKEN }}
2323

24-
- name: Build OCT container image
25-
run: docker build -t quay.io/testnetworkfunction/oct:latest --build-arg TOKEN=${{ secrets.PULL_TOKEN }} --no-cache .
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v3
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
2628

2729
- name: Authenticate against Quay.io
2830
uses: docker/login-action@v3
@@ -33,5 +35,15 @@ jobs:
3335
username: ${{ secrets.QUAY_ROBOT_USER }}
3436
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
3537

36-
- name: Push the newly built image to Quay.io
37-
run: docker push quay.io/testnetworkfunction/oct:latest
38+
- name: Build and push the latest images for multi-arch
39+
uses: docker/build-push-action@v5
40+
with:
41+
context: .
42+
build-args: |
43+
TOKEN=${{ secrets.PULL_TOKEN }}
44+
file: ./Dockerfile
45+
platforms: linux/amd64,linux/arm64
46+
no-cache: true
47+
push: true
48+
tags: |
49+
quay.io/testnetworkfunction/oct:latest

0 commit comments

Comments
 (0)