Skip to content

Commit 0c591e7

Browse files
committed
Chore: update GitHub Actions to use latest versions of actions and improve multi-arch support
1 parent ed9a2d0 commit 0c591e7

6 files changed

Lines changed: 25 additions & 17 deletions

File tree

.github/workflows/PR-verify.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
workflow_dispatch:
88

9+
env:
10+
NODE_VERSION: "20"
11+
912
jobs:
1013
repo-linter:
1114
name: Repo Linter

.github/workflows/check-code-gen.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout 🧲
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1313

1414
- name: Setup Go ⬇️
15-
uses: actions/setup-go@v3
15+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
1616
with:
1717
go-version: 1.24.2
1818

@@ -26,14 +26,14 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- name: Checkout 🧲
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3030

3131
- name: Setup Go ⬇️
32-
uses: actions/setup-go@v3
32+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
3333
with:
3434
go-version: 1.24.2
3535

36-
- name: Check dependencies Generation 🧪
36+
- name: Check SDK Code Generation 🧪
3737
run: |
3838
make generate manifests
3939
git diff --ignore-matching-lines='.*createdAt:.*' --exit-code

.github/workflows/go-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout 🧲
12-
uses: actions/checkout@v4
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1313

1414
- name: Restore go build cache ⏬
1515
uses: actions/cache@v4
@@ -18,7 +18,7 @@ jobs:
1818
key: ${{ runner.os }}-go-build-v1
1919

2020
- name: Setup Go ⬇️
21-
uses: actions/setup-go@v3
21+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
2222
with:
2323
go-version: 1.24.2
2424

@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
steps:
3434
- name: Checkout 🧲
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
3636

3737
- name: Restore go build cache ⏬
3838
uses: actions/cache@v4
@@ -41,7 +41,7 @@ jobs:
4141
key: ${{ runner.os }}-go-build-v1
4242

4343
- name: Setup Go ⬇️
44-
uses: actions/setup-go@v3
44+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
4545
with:
4646
go-version: 1.24.2
4747

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,17 @@ jobs:
9292
username: ${{ github.actor }}
9393
password: ${{ secrets.GITHUB_TOKEN }}
9494

95-
- name: 🏗️ Build and push Operator image
95+
- name: 🖥️ Set up QEMU (multi-arch emulation)
96+
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
97+
98+
- name: 🔧 Set up Docker Buildx
99+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
100+
101+
- name: 🏗️ Build and push Operator image (multi-arch)
96102
run: |
97-
make docker-build docker-push
103+
make docker-buildx PLATFORMS=linux/amd64,linux/arm64
98104
- name: 🏗️ Build and push Operator bundle
99105
run: |
100-
make bundle
101106
make bundle-build bundle-push
102107
- name: 🏗️ Build and push Operator catalog
103108
run: |

.github/workflows/test-bundle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
steps:
1313
# Checkout the repository
1414
- name: Checkout repository
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1616

1717
# Set up Go environment
1818
- name: Set up Go
19-
uses: actions/setup-go@v4
19+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
2020
with:
2121
go-version: "1.24.2"
2222

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ bundle: manifests kustomize operator-sdk ## Generate bundle manifests and metada
286286
cp -r chart/* deploy/chart/$(VERSION)/
287287

288288
.PHONY: bundle-build
289-
bundle-build: ## Build the bundle image.
290-
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
289+
bundle-build: ## Build the bundle image (multi-arch).
290+
$(CONTAINER_TOOL) buildx build --push --platform=$(PLATFORMS) -f bundle.Dockerfile -t $(BUNDLE_IMG) .
291291

292292
.PHONY: bundle-push
293293
bundle-push: ## Push the bundle image.
@@ -327,7 +327,7 @@ endif
327327
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
328328
.PHONY: catalog-build
329329
catalog-build: opm ## Build a catalog image.
330-
$(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
330+
$(OPM) index add --container-tool $(CONTAINER_TOOL) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
331331

332332
# Push the catalog image.
333333
.PHONY: catalog-push

0 commit comments

Comments
 (0)