mirror of
https://github.com/project-zot/zot.git
synced 2026-06-17 21:17:58 +08:00
build: migrate to golang 1.23.x (#2701)
* build: migrate to golang 1.23.x Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> * fix: golangci-lint reported errors Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com> --------- Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
GitHub
parent
a76bfd4283
commit
5465aa0d51
@@ -18,7 +18,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
# Run benchmark with `go test -bench` and stores the output to a file
|
||||
- name: Run benchmark
|
||||
run: make BENCH_OUTPUT=ci-cd run-bench
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Cache go dependencies
|
||||
id: cache-go-dependencies
|
||||
uses: actions/cache@v4
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Check out source code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Checkout zot (main branch)
|
||||
run: |
|
||||
mkdir -p $GITHUB_WORKSPACE/zot_main
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
|
||||
- name: Run zb
|
||||
id: bench
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
|
||||
- name: Run zb
|
||||
id: bench
|
||||
@@ -82,7 +82,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- uses: ./.github/actions/setup-localstack
|
||||
- name: Setup minio service
|
||||
run: |
|
||||
@@ -157,7 +157,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- uses: ./.github/actions/setup-localstack
|
||||
- name: Setup minio service
|
||||
run: |
|
||||
|
||||
@@ -18,13 +18,13 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: '1.22'
|
||||
go-version: '1.23'
|
||||
- uses: actions/checkout@v4
|
||||
- name: Run linter with GH action
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
||||
version: v1.59.1
|
||||
version: v1.61.0
|
||||
|
||||
# Optional: working directory, useful for monorepos
|
||||
# working-directory: somedir
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
@@ -22,7 +22,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install go-licenses
|
||||
run: go install github.com/google/go-licenses@latest
|
||||
- name: Check for forbidden licenses
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- uses: ./.github/actions/setup-localstack
|
||||
|
||||
- name: Run zb
|
||||
@@ -127,7 +127,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- uses: ./.github/actions/setup-localstack
|
||||
|
||||
- name: Run zb
|
||||
@@ -175,7 +175,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
@@ -206,7 +206,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
@@ -20,11 +20,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- name: Install go 1.22
|
||||
- name: Install go 1.23
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Checkout this PR
|
||||
uses: actions/checkout@v4
|
||||
- name: Start zot server
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
golang_version:
|
||||
- "1.22"
|
||||
- "1.23"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Log in to GitHub Docker Registry
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Cache go dependencies
|
||||
id: cache-go-dependencies
|
||||
uses: actions/cache@v4
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Cache go dependencies
|
||||
id: cache-go-dependencies
|
||||
uses: actions/cache@v4
|
||||
@@ -99,7 +99,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Cache go dependencies
|
||||
id: cache-go-dependencies
|
||||
uses: actions/cache@v4
|
||||
@@ -133,7 +133,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: download all workflow coverage files
|
||||
uses: actions/download-artifact@v4
|
||||
- name: merge code coverage
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
cache: false
|
||||
go-version: 1.22.x
|
||||
go-version: 1.23.x
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Build zot
|
||||
|
||||
Reference in New Issue
Block a user