Skip to content

Commit

Permalink
actions: use go-version-file: .go-version
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Nov 30, 2022
1 parent 86d64cf commit 5cb76a3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/changelog.yml
Expand Up @@ -6,11 +6,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch Go version from .go-version
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- name: check pr-has-fragment
run: |
GOBIN=$PWD/bin go install github.com/elastic/elastic-agent-changelog-tool@latest
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/golangci-lint.yml
Expand Up @@ -20,14 +20,9 @@ jobs:
steps:
- uses: actions/checkout@v3

# Uses Go version from the repository.
- name: Read .go-version file
id: goversion
run: echo "::set-output name=version::$(cat .go-version)"

- uses: actions/setup-go@v3
with:
go-version: "${{ steps.goversion.outputs.version }}"
go-version-file: .go-version

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos.yml
Expand Up @@ -12,11 +12,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Fetch Go version from .go-version
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: .go-version
- name: Install dependencies
run: go install github.com/magefile/mage
- name: Run build
Expand Down

0 comments on commit 5cb76a3

Please sign in to comment.