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

check and use the latest go available for the defined version #690

Merged
merged 3 commits into from
Apr 21, 2022
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
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build

on:
pull_request:
pull_request:
branches: ['main']

jobs:
Expand All @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ['1.17.x', '1.18.x']
go-version: ['1.17', '1.18']
name: Build ${{ matrix.go-version }}
runs-on: ubuntu-latest

Expand All @@ -19,6 +19,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
check-latest: true

- run: |
go build ./...
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: Build and run ko container
env:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/go-1.18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
strategy:
fail-fast: false
matrix:
ko-go-version: ['1.17.x', '1.18.x']
user-go-version: ['1.17.x', '1.18.x']
ko-go-version: ['1.17', '1.18']
user-go-version: ['1.17', '1.18']
name: Go 1.18 compat (ko=${{ matrix.ko-go-version }} / user=${{ matrix.user-go-version }})
runs-on: ubuntu-latest

Expand All @@ -21,12 +21,14 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.ko-go-version }}
check-latest: true
- run: go install ./

# Run ko using user-go-version
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.user-go-version }}
check-latest: true
- run: |
go install github.com/google/go-containerregistry/cmd/registry@latest
registry &
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17.x
- uses: sigstore/[email protected]
go-version: 1.17
check-latest: true
- uses: sigstore/[email protected]

# Build ko from HEAD, build and push an image tagged with the commit SHA,
# then keylessly sign it with cosign.
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/kind-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.17
check-latest: true

- uses: actions/checkout@v3

- name: Install ko
Expand All @@ -33,9 +35,9 @@ jobs:
registry-authority: ${{ env.REGISTRY_NAME }}:${{ env.REGISTRY_PORT }}

- name: Install Cosign
uses: sigstore/[email protected].0
uses: sigstore/[email protected].1
with:
cosign-release: 'v1.5.1'
cosign-release: 'v1.7.2'

- name: Run Smoke Test
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/modules-integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ jobs:
name: Module Tests
strategy:
matrix:
go-version: [1.17.x, 1.18.x]
go-version: [1.17, 1.18]

runs-on: 'ubuntu-latest'
steps:
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
check-latest: true

- uses: actions/checkout@v3

- env:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
- run: git fetch --prune --unshallow
- uses: actions/setup-go@v3
with:
go-version: 1.18.x
go-version: 1.18
check-latest: true
- uses: goreleaser/[email protected]
with:
version: latest
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/sbom.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Validate SBOMs

on:
pull_request:
pull_request:
branches: ['main']

jobs:
Expand All @@ -15,7 +15,8 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.17.x'
go-version: 1.17
check-latest: true
- name: Install cmd/registry
run: |
go install github.com/google/go-containerregistry/cmd/registry@latest
Expand All @@ -38,14 +39,15 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.17.x'
go-version: 1.17
check-latest: true
- name: Install cmd/registry
run: |
go install github.com/google/go-containerregistry/cmd/registry@latest
registry &
- uses: actions/checkout@v3

- name: Install CycloneDX
- name: Install CycloneDX
run: |
wget https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.22.0/cyclonedx-linux-x64
chmod +x cyclonedx-linux-x64
Expand All @@ -72,7 +74,8 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.17.x'
go-version: 1.17
check-latest: true
- name: Install cmd/registry
run: |
go install github.com/google/go-containerregistry/cmd/registry@latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.17
check-latest: true
- uses: actions/checkout@v3
- uses: chainguard-dev/actions/gofmt@84c993eaf02da1c325854fb272a4df9184bd80fc # main
with:
Expand All @@ -24,7 +25,8 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.17
check-latest: true
- uses: actions/checkout@v3
- uses: chainguard-dev/actions/goimports@84c993eaf02da1c325854fb272a4df9184bd80fc # main

Expand All @@ -36,7 +38,8 @@ jobs:
- name: Set up Go
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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.17
check-latest: true

- run: go test -coverprofile=coverage.txt -covermode=atomic -race ./...

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.17
check-latest: true
- uses: actions/checkout@v3
- name: Verify
run: ./hack/presubmit.sh