Skip to content

Commit 6c26ccd

Browse files
v1vmergify[bot]
authored andcommitted
actions: use go-version-file: .go-version (#1841)
see actions/setup-go#295 (cherry picked from commit 3d8e3c7)
1 parent 8fb2a0e commit 6c26ccd

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

.github/workflows/changelog.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v3
9-
- name: Fetch Go version from .go-version
10-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
119
- uses: actions/setup-go@v3
1210
with:
13-
go-version: ${{ env.GO_VERSION }}
11+
go-version-file: .go-version
1412
- name: check pr-has-fragment
1513
run: |
1614
GOBIN=$PWD/bin go install github.com/elastic/elastic-agent-changelog-tool@latest

.github/workflows/golangci-lint.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,9 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v3
2222

23-
# Uses Go version from the repository.
24-
- name: Read .go-version file
25-
id: goversion
26-
run: echo "::set-output name=version::$(cat .go-version)"
27-
2823
- uses: actions/setup-go@v3
2924
with:
30-
go-version: "${{ steps.goversion.outputs.version }}"
25+
go-version-file: .go-version
3126

3227
- name: golangci-lint
3328
uses: golangci/golangci-lint-action@v3

.github/workflows/macos.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ jobs:
1212
runs-on: macos-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- name: Fetch Go version from .go-version
16-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
1715
- uses: actions/setup-go@v3
1816
with:
19-
go-version: ${{ env.GO_VERSION }}
17+
go-version-file: .go-version
2018
- name: Install dependencies
2119
run: go install github.com/magefile/mage
2220
- name: Run build

0 commit comments

Comments
 (0)