diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6682b7802..46386af0c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,13 +12,14 @@ jobs: strategy: matrix: - go-version: [1.14.x, 1.15.x, 1.16.x, 1.17.x] + go-version: [1.14, 1.15, 1.16, 1.17, 1.18] steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: go-version: ${{ matrix.go-version }} + check-latest: true - run: | go build ./... diff --git a/.github/workflows/bump-deps.yaml b/.github/workflows/bump-deps.yaml index 6fe913830..033246bb9 100644 --- a/.github/workflows/bump-deps.yaml +++ b/.github/workflows/bump-deps.yaml @@ -22,6 +22,7 @@ jobs: - uses: actions/setup-go@v3 with: go-version: 1.17 + check-latest: true - run: ./hack/bump-deps.sh - name: Create Pull Request diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index df9ccc436..a09eb819b 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -1,7 +1,7 @@ name: Basic e2e test on: - pull_request: + pull_request: branches: ['main'] jobs: @@ -19,7 +19,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17.x + go-version: 1.17 + check-latest: true - name: crane append to an image, set the entrypoint, run it locally, roundtrip it shell: bash @@ -53,7 +54,7 @@ jobs: --new_layer crane.tar)) # Run the image with and without args. - docker run $img + docker run $img docker run $img --help # Make sure we can roundtrip it through pull/push diff --git a/.github/workflows/ecr-auth.yaml b/.github/workflows/ecr-auth.yaml index 7c6a6ec2b..f0269b30a 100644 --- a/.github/workflows/ecr-auth.yaml +++ b/.github/workflows/ecr-auth.yaml @@ -21,7 +21,8 @@ jobs: - name: Set up Go 1.17.x uses: actions/setup-go@v3 with: - go-version: 1.17.x + go-version: 1.17 + check-latest: true - name: Check out code uses: actions/checkout@v3 @@ -51,7 +52,8 @@ jobs: - name: Set up Go 1.17.x uses: actions/setup-go@v3 with: - go-version: 1.17.x + go-version: 1.17 + check-latest: true - name: Check out code uses: actions/checkout@v3 diff --git a/.github/workflows/ghcr-auth.yaml b/.github/workflows/ghcr-auth.yaml index d219f747c..383796446 100644 --- a/.github/workflows/ghcr-auth.yaml +++ b/.github/workflows/ghcr-auth.yaml @@ -17,7 +17,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17.x + go-version: 1.17 + check-latest: true - name: Install krane working-directory: ./cmd/krane diff --git a/.github/workflows/presubmit.yaml b/.github/workflows/presubmit.yaml index 4120bc52c..c3dcb4fdd 100644 --- a/.github/workflows/presubmit.yaml +++ b/.github/workflows/presubmit.yaml @@ -29,5 +29,6 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.17.x + go-version: 1.17 + check-latest: true - run: ./hack/presubmit.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8998a6ca..72ad2f378 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,7 +13,8 @@ jobs: run: git fetch --prune --unshallow - uses: actions/setup-go@v3 with: - go-version: 1.16.x + go-version: 1.17 + check-latest: true - uses: goreleaser/goreleaser-action@v2 with: version: latest diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml index b4cda1e06..69e394d5a 100644 --- a/.github/workflows/stale.yaml +++ b/.github/workflows/stale.yaml @@ -22,7 +22,7 @@ jobs: stale-pr-message: |- This Pull Request is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of - inactivity. Keep fresh with the 'lifecycle/frozen' label. + inactivity. Keep fresh with the 'lifecycle/frozen' label. stale-pr-label: 'lifecycle/stale' exempt-pr-labels: 'lifecycle/frozen' diff --git a/.github/workflows/style.yaml b/.github/workflows/style.yaml index 17cd0b335..c5dc2053c 100644 --- a/.github/workflows/style.yaml +++ b/.github/workflows/style.yaml @@ -12,7 +12,8 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.16.x + go-version: 1.17 + check-latest: true - uses: actions/checkout@v3 - uses: chainguard-dev/actions/goimports@84c993eaf02da1c325854fb272a4df9184bd80fc # main @@ -24,11 +25,12 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: - go-version: 1.16.x + go-version: 1.17 + check-latest: true - uses: golangci/golangci-lint-action@v3.1.0 with: - version: v1.42.1 + version: v1.45.2 - uses: reviewdog/action-misspell@v1 if: ${{ always() }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a09dc2b14..65c268468 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,7 +11,7 @@ jobs: test: strategy: matrix: - go-version: [1.14.x, 1.15.x, 1.16.x, 1.17.x] + go-version: [1.14, 1.15, 1.16, 1.17, 1.18] name: Unit Tests runs-on: ubuntu-latest @@ -21,6 +21,7 @@ jobs: - uses: actions/setup-go@v3 with: go-version: ${{ matrix.go-version }} + check-latest: true - run: go test -coverprofile=coverage.txt -covermode=atomic -race ./... diff --git a/pkg/v1/remote/transport/error_test.go b/pkg/v1/remote/transport/error_test.go index 20019c2a5..10ef01097 100644 --- a/pkg/v1/remote/transport/error_test.go +++ b/pkg/v1/remote/transport/error_test.go @@ -208,7 +208,7 @@ func TestCheckErrorWithError(t *testing.T) { }} for _, test := range tests { - b, err := json.Marshal(test.error) + b, err := json.Marshal(test.error) // nolint: staticcheck if err != nil { t.Errorf("json.Marshal(%v) = %v", test.error, err) } diff --git a/pkg/v1/remote/write_test.go b/pkg/v1/remote/write_test.go index f85d027db..399628c82 100644 --- a/pkg/v1/remote/write_test.go +++ b/pkg/v1/remote/write_test.go @@ -894,7 +894,7 @@ func TestWriteWithErrors(t *testing.T) { if r.Method != http.MethodPost { t.Errorf("Method; got %v, want %v", r.Method, http.MethodPost) } - b, err := json.Marshal(expectedError) + b, err := json.Marshal(expectedError) // nolint: staticcheck if err != nil { t.Fatalf("json.Marshal() = %v", err) }