Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub Actions packages and runners for deprecations #14

Merged
merged 8 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
env:
# Go version we currently use to build containerd across all CI.
# Note: don't forget to update `Binaries` step, as it contains the matrix of all supported Go versions.
GO_VERSION: "1.21.0"
GO_VERSION: "1.22.8"

permissions: # added using https://github.com/step-security/secure-workflows
contents: read
Expand All @@ -29,18 +29,18 @@ jobs:

strategy:
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
os: [ubuntu-22.04, macos-13, windows-2022]

steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false # see actions/setup-go#368

- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v6
with:
version: v1.52.2
version: v1.61.0
skip-cache: true
args: --timeout=5m

Expand All @@ -54,12 +54,12 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false # see actions/setup-go#368

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/github.com/containerd/platforms
fetch-depth: 25
Expand All @@ -76,14 +76,14 @@ jobs:

strategy:
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
os: [ubuntu-22.04, macos-13, windows-2022]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
path: src/github.com/containerd/platforms

- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

Expand Down
8 changes: 5 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
linters:
enable:
- exportloopref # Checks for pointers to enclosing loop variables
- copyloopvar
- gofmt
- goimports
- gosec
Expand All @@ -12,14 +12,16 @@ linters:
- tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17
- unconvert
- unused
- vet
- govet
- dupword # Checks for duplicate words in the source code
disable:
- errcheck

run:
timeout: 5m
skip-dirs:

issues:
exclude-dirs:
- api
- cluster
- design
Expand Down
6 changes: 3 additions & 3 deletions defaults_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ func getOSVersion(osVersionPrefix string) osVersion {
return osVersion{}
}

majorVersion, _ := strconv.Atoi(parts[0])
minorVersion, _ := strconv.Atoi(parts[1])
buildNumber, _ := strconv.Atoi(parts[2])
majorVersion, _ := strconv.ParseUint(parts[0], 10, 8)
minorVersion, _ := strconv.ParseUint(parts[1], 10, 8)
buildNumber, _ := strconv.ParseUint(parts[2], 10, 16)

return osVersion{
MajorVersion: uint8(majorVersion),
Expand Down
Loading