Skip to content

Commit

Permalink
Merge pull request k0sproject#302 from makhov/docs-release-pipeline-g…
Browse files Browse the repository at this point in the history
…o-version

Get go version from the go.mod on pipelines
  • Loading branch information
makhov authored Oct 13, 2023
2 parents 4ff0a2c + 7548dfe commit 1c74d96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ on:
- LICENSE
- '**.svg'

env:
GO_VERSION: "1.21.1"

jobs:
build:
name: Build
Expand All @@ -41,7 +38,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Build
run: |
Expand Down Expand Up @@ -77,13 +74,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Check out code into the Go module directory
uses: actions/checkout@v4
go-version-file: go.mod

- name: Run unit tests
run: |
Expand Down Expand Up @@ -111,7 +108,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Create image bundle
run: |
Expand Down Expand Up @@ -145,7 +142,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Create image bundle
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
cache: pip
cache-dependency-path: docs/requirements.txt

- name: Set up Go ${{ env.GO_VERSION }}
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod

- name: Install dependencies
run: |
Expand Down

0 comments on commit 1c74d96

Please sign in to comment.