Skip to content

Commit

Permalink
ci: build and test using 1.18 and 1.19 (drop 1.17) (#812)
Browse files Browse the repository at this point in the history
* ci: build and test using 1.18 and 1.19 (drop 1.17)

* remove pre-1.18 compat code, update README

* go install goimports before checkout

* update chainguard-dev/actions to versions that go install
  • Loading branch information
imjasonh authored Sep 6, 2022
1 parent 9777023 commit 9a1eae8
Show file tree
Hide file tree
Showing 16 changed files with 50 additions and 358 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ['1.17', '1.18']
go-version: ['1.18', '1.19']
name: Build ${{ matrix.go-version }}
runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true

- name: Build and run ko container
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/go-1.18.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true
- uses: sigstore/cosign-installer@v2.5.1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kind-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true

- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/modules-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Module Tests
strategy:
matrix:
go-version: [1.17, 1.18]
go-version: [1.18, 1.19]

runs-on: 'ubuntu-latest'
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sbom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true
- uses: chainguard-dev/actions/setup-registry@main
- uses: actions/checkout@v3
Expand All @@ -39,7 +39,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true
- uses: chainguard-dev/actions/setup-registry@main
- uses: actions/checkout@v3
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true
- uses: chainguard-dev/actions/setup-registry@main
- uses: actions/checkout@v3
Expand Down Expand Up @@ -104,7 +104,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true
- uses: chainguard-dev/actions/setup-registry@main
- uses: actions/checkout@v3
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- uses: chainguard-dev/actions/gofmt@84c993eaf02da1c325854fb272a4df9184bd80fc # main
- uses: chainguard-dev/actions/gofmt@d886686603afb809f7ef9b734b333e20b7ce5cda
with:
args: -s

Expand All @@ -25,10 +25,10 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- uses: chainguard-dev/actions/goimports@84c993eaf02da1c325854fb272a4df9184bd80fc # main
- uses: chainguard-dev/actions/goimports@d886686603afb809f7ef9b734b333e20b7ce5cda

lint:
name: Lint
Expand All @@ -38,16 +38,16 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true

- name: Check out code
uses: actions/checkout@v3

- uses: chainguard-dev/actions/trailing-space@84c993eaf02da1c325854fb272a4df9184bd80fc # main
- uses: chainguard-dev/actions/trailing-space@d886686603afb809f7ef9b734b333e20b7ce5cda
if: ${{ always() }}

- uses: chainguard-dev/actions/eof-newline@84c993eaf02da1c325854fb272a4df9184bd80fc # main
- uses: chainguard-dev/actions/eof-newline@d886686603afb809f7ef9b734b333e20b7ce5cda
if: ${{ always() }}

- uses: reviewdog/action-misspell@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true

- run: go test -coverprofile=coverage.txt -covermode=atomic -race ./...
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
check-latest: true
- uses: actions/checkout@v3
- name: Verify
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ apk add ko

### Build and Install from Source

With Go 1.16+, build and install the latest released version:
With Go 1.18+, build and install the latest released version:

```
go install github.com/google/ko@latest
Expand Down
3 changes: 2 additions & 1 deletion internal/sbom/cyclonedx.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"encoding/base64"
"encoding/hex"
"encoding/json"
"runtime/debug"
"strings"

"github.com/sigstore/cosign/pkg/oci"
Expand All @@ -42,7 +43,7 @@ func GenerateImageCycloneDX(mod []byte) ([]byte, error) {
return nil, err
}

bi, err := ParseBuildInfo(string(mod))
bi, err := debug.ParseBuildInfo(string(mod))
if err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit 9a1eae8

Please sign in to comment.