Skip to content

Commit 11891f4

Browse files
authored
Merge pull request #323 from adrianchiris/bump-golang-123
bump golang to 1.23
2 parents ff07f0c + c4601d1 commit 11891f4

File tree

12 files changed

+84
-293
lines changed

12 files changed

+84
-293
lines changed

.github/workflows/buildtest.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build-test:
1010
strategy:
1111
matrix:
12-
go-version: [1.22.x]
12+
go-version: [1.23.x]
1313
os: [ubuntu-latest]
1414
goos: [linux]
1515
goarch: [amd64, arm64, ppc64le]
@@ -41,7 +41,7 @@ jobs:
4141
- name: Set up Go
4242
uses: actions/setup-go@v4
4343
with:
44-
go-version: 1.22.x
44+
go-version: 1.23.x
4545

4646
- name: Check out code
4747
uses: actions/checkout@v3
@@ -69,7 +69,7 @@ jobs:
6969
run: podman build -t ghaction-sriov-cni:pr-${{github.event.pull_request.number}} .
7070

7171
- name: Check out sriov operator's code
72-
uses: actions/checkout@v2
72+
uses: actions/checkout@v3
7373
with:
7474
repository: k8snetworkplumbingwg/sriov-network-operator
7575
path: sriov-network-operator-wc

.github/workflows/image-push-master.yml

Lines changed: 18 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -8,111 +8,41 @@ on:
88
branches:
99
- master
1010
jobs:
11-
build-and-push-amd64-sriov-cni:
12-
name: Image Push AMD64
13-
runs-on: ubuntu-20.04
11+
build-and-push-image-master:
12+
name: image build and push
13+
runs-on: ubuntu-24.04
1414
steps:
1515
- name: Check out the repo
16-
uses: actions/checkout@v3
17-
18-
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v2
20-
21-
- name: Login to Docker
22-
uses: docker/login-action@v2
23-
with:
24-
registry: ghcr.io
25-
username: ${{ github.repository_owner }}
26-
password: ${{ secrets.GITHUB_TOKEN }}
27-
28-
- name: Build and push sriov-cni
29-
uses: docker/build-push-action@v4
30-
with:
31-
context: .
32-
push: true
33-
platforms: linux/amd64
34-
tags: |
35-
${{ env.IMAGE_NAME }}:latest-amd64
36-
${{ env.IMAGE_NAME }}:${{ github.sha }}
37-
file: ./Dockerfile
38-
39-
build-and-push-arm64-sriov-cni:
40-
name: Image Push ARM64
41-
runs-on: ubuntu-20.04
42-
steps:
43-
- name: Check out the repo
44-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
4517

4618
- name: Set up QEMU
47-
uses: docker/setup-qemu-action@v2
19+
uses: docker/setup-qemu-action@v3
4820

4921
- name: Set up Docker Buildx
50-
uses: docker/setup-buildx-action@v2
22+
uses: docker/setup-buildx-action@v3
5123

5224
- name: Login to Docker
53-
uses: docker/login-action@v2
25+
uses: docker/login-action@v3
5426
with:
5527
registry: ghcr.io
5628
username: ${{ github.repository_owner }}
5729
password: ${{ secrets.GITHUB_TOKEN }}
5830

59-
- name: Build and push sriov-cni
60-
uses: docker/build-push-action@v4
61-
with:
62-
context: .
63-
push: true
64-
platforms: linux/arm64
65-
tags: |
66-
${{ env.IMAGE_NAME }}:latest-arm64
67-
file: ./Dockerfile.arm64
68-
69-
build-and-push-ppc64le-sriov-cni:
70-
name: Image Push ppc64le
71-
runs-on: ubuntu-20.04
72-
steps:
73-
- name: Check out the repo
74-
uses: actions/checkout@v3
75-
76-
- name: Set up QEMU
77-
uses: docker/setup-qemu-action@v2
78-
79-
- name: Set up Docker Buildx
80-
uses: docker/setup-buildx-action@v2
81-
82-
- name: Login to Docker
83-
uses: docker/login-action@v2
31+
- name: Docker meta
32+
id: meta
33+
uses: docker/metadata-action@v5
8434
with:
85-
registry: ghcr.io
86-
username: ${{ github.repository_owner }}
87-
password: ${{ secrets.GITHUB_TOKEN }}
35+
images: ${{ env.IMAGE_NAME }}
8836

8937
- name: Build and push sriov-cni
90-
uses: docker/build-push-action@v4
38+
uses: docker/build-push-action@v6
9139
with:
9240
context: .
9341
push: true
94-
platforms: linux/ppc64le
42+
platforms: linux/amd64,linux/arm64,linux/ppc64le
9543
tags: |
96-
${{ env.IMAGE_NAME }}:latest-ppc64le
97-
file: ./Dockerfile.ppc64le
98-
99-
push-manifest:
100-
runs-on: ubuntu-20.04
101-
needs: [build-and-push-amd64-sriov-cni,build-and-push-arm64-sriov-cni,build-and-push-ppc64le-sriov-cni]
102-
steps:
103-
- name: Set up Docker Buildx
104-
uses: docker/setup-buildx-action@v2
105-
106-
- name: Login to GitHub Container Registry
107-
uses: docker/login-action@v2
108-
with:
109-
registry: ghcr.io
110-
username: ${{ github.repository_owner }}
111-
password: ${{ secrets.GITHUB_TOKEN }}
112-
113-
- name: Create manifest for multi-arch images
114-
run: |
115-
docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:latest \
116-
${{ env.IMAGE_NAME }}:latest-amd64 \
117-
${{ env.IMAGE_NAME }}:latest-arm64 \
118-
${{ env.IMAGE_NAME }}:latest-ppc64le
44+
${{ env.IMAGE_NAME }}:latest
45+
${{ env.IMAGE_NAME }}:${{ github.sha }}
46+
labels: |
47+
${{ steps.meta.outputs.labels }}
48+
file: ./Dockerfile

.github/workflows/image-push-release.yml

Lines changed: 15 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,29 @@ on:
88
tags:
99
- v*
1010
jobs:
11-
build-and-push-amd64-sriov-cni:
12-
runs-on: ubuntu-20.04
13-
name: Image push AMD64
11+
build-and-push-image-release:
12+
runs-on: ubuntu-24.04
13+
name: image build and push on release
1414
steps:
1515
- name: Check out the repo
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717

18+
- name: Set up QEMU
19+
uses: docker/setup-qemu-action@v3
20+
1821
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v2
22+
uses: docker/setup-buildx-action@v3
2023

2124
- name: Login to Docker
22-
uses: docker/login-action@v2
25+
uses: docker/login-action@v3
2326
with:
2427
registry: ghcr.io
2528
username: ${{ github.repository_owner }}
2629
password: ${{ secrets.GITHUB_TOKEN }}
2730

2831
- name: Docker meta
2932
id: docker_meta
30-
uses: docker/metadata-action@v4
33+
uses: docker/metadata-action@v5
3134
with:
3235
images: ${{ env.IMAGE_NAME }}
3336
flavor: |
@@ -36,116 +39,13 @@ jobs:
3639
type=ref,event=tag
3740
3841
- name: Build and push sriov-cni
39-
uses: docker/build-push-action@v4
42+
uses: docker/build-push-action@v6
4043
with:
4144
context: .
4245
push: true
43-
platforms: linux/amd64
46+
platforms: linux/amd64,linux/arm64,linux/ppc64le
4447
tags: |
45-
${{ steps.docker_meta.outputs.tags }}-amd64
48+
${{ steps.docker_meta.outputs.tags }}
49+
labels: |
50+
${{ steps.meta.outputs.labels }}
4651
file: ./Dockerfile
47-
48-
build-and-push-arm64-sriov-cni:
49-
runs-on: ubuntu-20.04
50-
name: Image push ARM64
51-
steps:
52-
- name: Check out the repo
53-
uses: actions/checkout@v3
54-
55-
- name: Set up Docker Buildx
56-
uses: docker/setup-buildx-action@v2
57-
58-
- name: Login to Docker
59-
uses: docker/login-action@v2
60-
with:
61-
registry: ghcr.io
62-
username: ${{ github.repository_owner }}
63-
password: ${{ secrets.GITHUB_TOKEN }}
64-
65-
- name: Docker meta
66-
id: docker_meta
67-
uses: docker/metadata-action@v4
68-
with:
69-
images: ${{ env.IMAGE_NAME }}
70-
flavor: |
71-
latest=false
72-
tags: |
73-
type=ref,event=tag
74-
75-
- name: Build and push sriov-cni
76-
uses: docker/build-push-action@v4
77-
with:
78-
context: .
79-
push: true
80-
platforms: linux/arm64
81-
tags: |
82-
${{ steps.docker_meta.outputs.tags }}-arm64
83-
file: ./Dockerfile.arm64
84-
85-
build-and-push-ppc64le-sriov-cni:
86-
runs-on: ubuntu-20.04
87-
name: Image push ppc64le
88-
steps:
89-
- name: Check out the repo
90-
uses: actions/checkout@v3
91-
92-
- name: Set up Docker Buildx
93-
uses: docker/setup-buildx-action@v2
94-
95-
- name: Login to Docker
96-
uses: docker/login-action@v2
97-
with:
98-
registry: ghcr.io
99-
username: ${{ github.repository_owner }}
100-
password: ${{ secrets.GITHUB_TOKEN }}
101-
102-
- name: Docker meta
103-
id: docker_meta
104-
uses: docker/metadata-action@v4
105-
with:
106-
images: ${{ env.IMAGE_NAME }}
107-
flavor: |
108-
latest=false
109-
tags: |
110-
type=ref,event=tag
111-
112-
- name: Build and push sriov-cni
113-
uses: docker/build-push-action@v4
114-
with:
115-
context: .
116-
push: true
117-
platforms: linux/ppc64le
118-
tags: |
119-
${{ steps.docker_meta.outputs.tags }}-ppc64le
120-
file: ./Dockerfile.ppc64le
121-
122-
push-manifest:
123-
runs-on: ubuntu-20.04
124-
needs: [build-and-push-amd64-sriov-cni,build-and-push-arm64-sriov-cni,build-and-push-ppc64le-sriov-cni]
125-
steps:
126-
- name: Set up Docker Buildx
127-
uses: docker/setup-buildx-action@v2
128-
129-
- name: Docker meta
130-
id: docker_meta
131-
uses: docker/metadata-action@v4
132-
with:
133-
images: ${{ env.IMAGE_NAME }}
134-
flavor: |
135-
latest=false
136-
tags: |
137-
type=ref,event=tag
138-
139-
- name: Login to GitHub Container Registry
140-
uses: docker/login-action@v2
141-
with:
142-
registry: ghcr.io
143-
username: ${{ github.repository_owner }}
144-
password: ${{ secrets.GITHUB_TOKEN }}
145-
146-
- name: Create manifest for multi-arch images
147-
run: |
148-
docker buildx imagetools create -t ${{ steps.docker_meta.outputs.tags }} \
149-
${{ steps.docker_meta.outputs.tags }}-amd64 \
150-
${{ steps.docker_meta.outputs.tags }}-arm64 \
151-
${{ steps.docker_meta.outputs.tags }}-ppc64le

.github/workflows/static-scan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Set up Go
99
uses: actions/setup-go@v4
1010
with:
11-
go-version: "1.22"
11+
go-version: "1.23"
1212
- uses: actions/checkout@v3
1313
- name: run make lint
1414
run: make lint

.golangci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
linters-settings:
2+
revive:
3+
rules:
4+
- name: dot-imports
5+
arguments:
6+
- allowedPackages:
7+
- "github.com/onsi/ginkgo/v2"
8+
- "github.com/onsi/gomega"
19
linters:
210
enable:
311
- revive

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:alpine as builder
1+
FROM golang:1.23-alpine as builder
22

33
COPY . /usr/src/sriov-cni
44

Dockerfile.arm64

Lines changed: 0 additions & 21 deletions
This file was deleted.

Dockerfile.ppc64le

Lines changed: 0 additions & 21 deletions
This file was deleted.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ build: | $(BUILDDIR) ; $(info Building $(BINARY_NAME)...) @ ## Build SR-IOV CNI
5454

5555
# Tools
5656
GOLANGCI_LINT = $(BINDIR)/golangci-lint
57-
GOLANGCI_LINT_VERSION = v1.52.2
57+
GOLANGCI_LINT_VERSION = v1.64.7
5858
$(GOLANGCI_LINT): | $(BINDIR) ; $(info Installing golangci-lint...)
5959
$Q GOBIN=$(BINDIR) $(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
6060

0 commit comments

Comments
 (0)