Skip to content

Commit

Permalink
read go version from go.mod (#1578)
Browse files Browse the repository at this point in the history
* read go version from go.mod in GAs
  • Loading branch information
spring1843 authored Mar 25, 2022
1 parent 08bc77e commit 0cf1010
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ jobs:
K8S_VERSION: ${{ matrix.k8sVersion }}
steps:
- uses: actions/checkout@v2
- run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2
with:
path: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deflake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2
with:
path: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sed -En 's/^go[[:space:]]+([[:digit:].]+)$/GO_VERSION=\1/p' go.mod >> $GITHUB_ENV
- uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v2
with:
path: |
Expand Down

0 comments on commit 0cf1010

Please sign in to comment.