Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actions: use go-version-file: .go-version #1841

Merged
merged 1 commit into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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