Skip to content

Commit 53448ff

Browse files
committed
Update CI to Go 1.23
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent d9418fe commit 53448ff

File tree

4 files changed

+17
-39
lines changed

4 files changed

+17
-39
lines changed

.github/workflows/build.yaml

+7-24
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,22 @@ on:
1010

1111
jobs:
1212
build:
13-
strategy:
14-
matrix:
15-
go-version: [1.21.x]
16-
os: [ubuntu-latest]
1713
concurrency:
1814
group: ${{ github.ref }}
1915
cancel-in-progress: true
2016

21-
runs-on: ${{ matrix.os }}
17+
runs-on: ubuntu-latest
2218

2319
steps:
2420
- uses: actions/checkout@master
2521
- name: Install Go
26-
uses: actions/setup-go@v2
22+
uses: actions/setup-go@master
2723
with:
28-
go-version: ${{ matrix.go-version }}
24+
go-version: 1.23.x
2925
- name: Set up QEMU
30-
uses: docker/setup-qemu-action@v2
26+
uses: docker/setup-qemu-action@v3
3127
- name: Set up Docker Buildx
32-
uses: docker/setup-buildx-action@v2
28+
uses: docker/setup-buildx-action@v3
3329

3430
- name: Get TAG
3531
id: get_tag
@@ -45,21 +41,8 @@ jobs:
4541
id: get_repo_owner
4642
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" > $GITHUB_ENV
4743

48-
- name: Build x86_64 container into library
49-
uses: docker/build-push-action@v2
50-
with:
51-
context: .
52-
file: ./Dockerfile
53-
outputs: "type=docker,push=false"
54-
platforms: linux/amd64
55-
build-args: |
56-
VERSION=${{ env.TAG }}
57-
GIT_COMMIT=${{ github.sha }}
58-
tags: |
59-
ghcr.io/${{ env.REPO_OWNER }}/queue-worker:${{ github.sha }}
60-
61-
- name: Build multi-arch containers for validation only
62-
uses: docker/build-push-action@v3
44+
- name: Build multi-arch container image
45+
uses: docker/build-push-action@v5
6346
with:
6447
context: .
6548
file: ./Dockerfile

.github/workflows/publish.yaml

+8-13
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,18 @@ on:
66
- '*'
77
jobs:
88
build:
9-
strategy:
10-
matrix:
11-
go-version: [1.21.x]
12-
os: [ubuntu-latest]
13-
14-
runs-on: ${{ matrix.os }}
9+
runs-on: ubuntu-latest
1510

1611
steps:
1712
- uses: actions/checkout@master
1813
- name: Install Go
19-
uses: actions/setup-go@v2
14+
uses: actions/setup-go@master
2015
with:
21-
go-version: ${{ matrix.go-version }}
16+
go-version: 1.23.x
2217
- name: Set up QEMU
23-
uses: docker/setup-qemu-action@v2
18+
uses: docker/setup-qemu-action@v3
2419
- name: Set up Docker Buildx
25-
uses: docker/setup-buildx-action@v2
20+
uses: docker/setup-buildx-action@v3
2621

2722
- name: Get TAG
2823
id: get_tag
@@ -40,18 +35,18 @@ jobs:
4035

4136

4237
- name: Login to Docker Registry
43-
uses: docker/login-action@v2
38+
uses: docker/login-action@v3
4439
with:
4540
username: ${{ github.repository_owner }}
4641
password: ${{ secrets.GITHUB_TOKEN }}
4742
registry: ghcr.io
4843
- name: Publish multi-arch containers to GHCR
49-
uses: docker/build-push-action@v3
44+
uses: docker/build-push-action@v5
5045
with:
5146
context: .
5247
file: ./Dockerfile
5348
outputs: "type=registry,push=true"
54-
platforms: linux/amd64,linux/arm/v7,linux/arm64
49+
platforms: linux/amd64,linux/arm64
5550
build-args: |
5651
VERSION=${{ env.TAG }}
5752
GIT_COMMIT=${{ github.sha }}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.21-alpine as build
2+
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23-alpine as build
33

44
ENV GO111MODULE=on
55
ENV CGO_ENABLED=0

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/openfaas/nats-queue-worker
22

3-
go 1.20
3+
go 1.23
44

55
require (
66
github.com/nats-io/stan.go v0.10.4

0 commit comments

Comments
 (0)