Skip to content

Commit

Permalink
actions: use go-version-file: .go-version (#33879) (#33886)
Browse files Browse the repository at this point in the history
see actions/setup-go#295

(cherry picked from commit 0105608)

Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com>
  • Loading branch information
mergify[bot] and v1v authored Nov 30, 2022
1 parent 1b1416d commit b7cd8ba
Show file tree
Hide file tree
Showing 33 changed files with 33 additions and 102 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/check-audtibeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,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: Run check-default
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-dev-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,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: Install libpcap-dev
run: sudo apt-get install -y libpcap-dev
- name: Install libsystemd-dev
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Install libsystemd-dev
run: sudo apt-get install -y libsystemd-dev
- name: Run check/update
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-libbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Install libpcap-dev
run: sudo apt-get install -y libpcap-dev
- name: Run check/update
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Install libpcap-dev
run: sudo apt-get install -y libpcap-dev
- name: Run check/update
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-winlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-auditbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Install librpm-dev
run: sudo apt-get install -y librpm-dev
- name: Run check/update
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-dockerlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Install libpcap-dev
run: sudo apt-get install -y libpcap-dev
- name: Run check/update
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-functionbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-libbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-osquerybeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
run: |
go install github.com/magefile/mage
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Install libpcap-dev
run: sudo apt-get install -y libpcap-dev
- name: Run check/update
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/check-xpack-winlogbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,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: Run check/update
uses: magefile/mage-action@v2
with:
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 @@ -28,14 +28,9 @@ jobs:

- 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
env:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos-auditbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos-filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos-metricbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos-packetbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos-xpack-auditbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos-xpack-filebeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos-xpack-functionbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/macos-xpack-heartbeat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.9'
Expand Down
Loading

0 comments on commit b7cd8ba

Please sign in to comment.