Skip to content

Commit

Permalink
Updating workflows to pull go version from go.mod file (#1025)
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Keister <jordan@nimblewidget.com>

Signed-off-by: Jordan Keister <jordan@nimblewidget.com>
  • Loading branch information
grokspawn committed Sep 23, 2022
1 parent 0e53caf commit bd3c804
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '~1.18'
go-version-file: "go.mod"
- run: make build
10 changes: 5 additions & 5 deletions .github/workflows/go-apidiff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '~1.18'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
id: go
- name: Run go-apidiff
uses: joelanford/go-apidiff@main
12 changes: 6 additions & 6 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
# GoReleaser requires fetch-depth: 0 to correctly
# run git describe
fetch-depth: 0
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '~1.18'
go-version-file: "go.mod"

- name: "Run GoReleaser"
run: make release
Expand All @@ -78,9 +78,9 @@ jobs:
# run git describe
fetch-depth: 0

- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '~1.18'
go-version-file: "go.mod"

- name: "Run GoReleaser"
run: make release
Expand All @@ -103,9 +103,9 @@ jobs:
# run git describe
fetch-depth: 0

- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '~1.18'
go-version-file: "go.mod"

- name: "Install linux cross-compilers"
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '~1.18'
go-version-file: "go.mod"
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Run sanity checks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '~1.18'
go-version-file: 'go.mod'
- name: Install podman
run: |
. /etc/os-release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '~1.18'
go-version-file: "go.mod"
- run: make unit
- run: sed -i'' "s:^github.com/$GITHUB_REPOSITORY/::" coverage.out
- run: .github/workflows/codecov.sh -Z -f coverage.out

0 comments on commit bd3c804

Please sign in to comment.