Skip to content

Commit 21eedd8

Browse files
Merge pull request #25 from uselagoon/multiarch-image
build: enable multiarch image and update GHA
2 parents c856d24 + 13da7ac commit 21eedd8

File tree

5 files changed

+20
-21
lines changed

5 files changed

+20
-21
lines changed

.github/workflows/aergia-controller.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
experimental: true
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2626
with:
2727
fetch-depth: "0"
2828
- name: Set up testing dependencies
2929
run: sudo apt-get update && sudo apt-get -y install build-essential && sudo apt-get clean
3030
- name: Setup correct Go version
31-
uses: actions/setup-go@v2
31+
uses: actions/setup-go@v5
3232
with:
3333
go-version: '1.21'
3434
- name: Install kustomize, kubebuilder, helm
@@ -53,14 +53,14 @@ jobs:
5353
node_image: kindest/node:${{ matrix.kindest_node_version }}
5454
config: test-resources/kind-cluster.yaml
5555
- name: Set up Docker Buildx
56-
uses: docker/setup-buildx-action@v1
56+
uses: docker/setup-buildx-action@v3
5757
- name: Build
58-
uses: docker/build-push-action@v2
58+
uses: docker/build-push-action@v5
5959
with:
6060
context: .
6161
load: true
62-
tags: amazeeiolocal/aergia:test-tag
62+
tags: testlagoon/aergia:test-tag
6363
- name: Run Tests
6464
run: |
65-
kind load docker-image amazeeiolocal/aergia:test-tag --name chart-testing
65+
kind load docker-image testlagoon/aergia:test-tag --name chart-testing
6666
make controller-test

.github/workflows/build_and_publish.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,41 @@ jobs:
1616
steps:
1717
-
1818
name: Checkout
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020
-
2121
name: Docker meta
2222
id: meta
23-
uses: docker/metadata-action@v3
23+
uses: docker/metadata-action@v5
2424
with:
2525
# list of Docker images to use as base name for tags
2626
images: |
27-
amazeeio/aergia
28-
ghcr.io/amazeeio/aergia
27+
uselagoon/aergia
28+
ghcr.io/uselagoon/aergia
2929
-
3030
name: Set up QEMU
31-
uses: docker/setup-qemu-action@v1
31+
uses: docker/setup-qemu-action@v3
3232
-
3333
name: Set up Docker Buildx
34-
uses: docker/setup-buildx-action@v1
34+
uses: docker/setup-buildx-action@v3
3535
-
3636
name: Login to DockerHub
37-
if: github.event_name != 'pull_request'
38-
uses: docker/login-action@v1
37+
uses: docker/login-action@v3
3938
with:
4039
username: ${{ secrets.DOCKERHUB_USERNAME }}
4140
password: ${{ secrets.DOCKERHUB_TOKEN }}
4241
-
4342
name: Login to GHCR
44-
if: github.event_name != 'pull_request'
45-
uses: docker/login-action@v1
43+
uses: docker/login-action@v3
4644
with:
4745
registry: ghcr.io
4846
username: ${{ github.repository_owner }}
4947
password: ${{ secrets.GITHUB_TOKEN }}
5048
-
5149
name: Build and push
52-
uses: docker/build-push-action@v2
50+
uses: docker/build-push-action@v5
5351
with:
5452
context: .
55-
push: ${{ github.event_name != 'pull_request' }}
53+
platforms: linux/amd64,linux/arm64
54+
push: true
5655
tags: ${{ steps.meta.outputs.tags }}
5756
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ COPY handlers/ handlers/
1616
COPY controllers/ controllers/
1717

1818
# Build
19-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go metrics.go
19+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} GO111MODULE=on go build -a -o manager main.go metrics.go
2020

2121
# Use distroless as minimal base image to package the manager binary
2222
# Refer to https://github.com/GoogleContainerTools/distroless for more details

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
# Image URL to use all building/pushing image targets
3-
IMG ?= amazeeiolocal/aergia:test-tag
3+
IMG ?= testlagoon/aergia:test-tag
44
# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
55
CRD_OPTIONS ?= "crd:trivialVersions=true"
66

test-resources/aergia-backend.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ spec:
258258
name: backend
259259
command:
260260
- /manager
261-
image: amazeeiolocal/aergia:test-tag
261+
image: testlagoon/aergia:test-tag
262262
name: manager
263263
resources:
264264
limits:

0 commit comments

Comments
 (0)