Skip to content

Commit ac3ca47

Browse files
v1vchrisberkhout
authored andcommitted
actions: use go-version-file: .go-version (#33879)
see actions/setup-go#295
1 parent 56e2333 commit ac3ca47

33 files changed

+33
-102
lines changed

.github/workflows/check-audtibeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-default.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v3
20-
- name: Fetch Go version from .go-version
21-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2220
- uses: actions/setup-go@v3
2321
with:
24-
go-version: ${{ env.GO_VERSION }}
22+
go-version-file: .go-version
2523
- name: Run check-default
2624
run: |
2725
go install github.com/magefile/mage

.github/workflows/check-dev-tools.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-docs.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v3
20-
- name: Fetch Go version from .go-version
21-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2220
- uses: actions/setup-go@v3
2321
with:
24-
go-version: ${{ env.GO_VERSION }}
22+
go-version-file: .go-version
2523
- name: Install libpcap-dev
2624
run: sudo apt-get install -y libpcap-dev
2725
- name: Install libsystemd-dev

.github/workflows/check-filebeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Install libsystemd-dev
2422
run: sudo apt-get install -y libsystemd-dev
2523
- name: Run check/update

.github/workflows/check-heartbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-libbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Install libpcap-dev
2422
run: sudo apt-get install -y libpcap-dev
2523
- name: Run check/update

.github/workflows/check-metricbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-packetbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Install libpcap-dev
2422
run: sudo apt-get install -y libpcap-dev
2523
- name: Run check/update

.github/workflows/check-winlogbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-xpack-auditbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Install librpm-dev
2422
run: sudo apt-get install -y librpm-dev
2523
- name: Run check/update

.github/workflows/check-xpack-dockerlogbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-xpack-filebeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Install libpcap-dev
2422
run: sudo apt-get install -y libpcap-dev
2523
- name: Run check/update

.github/workflows/check-xpack-functionbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-xpack-heartbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-xpack-libbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-xpack-metricbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-xpack-osquerybeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
run: |
2523
go install github.com/magefile/mage

.github/workflows/check-xpack-packetbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Install libpcap-dev
2422
run: sudo apt-get install -y libpcap-dev
2523
- name: Run check/update

.github/workflows/check-xpack-winlogbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Fetch Go version from .go-version
19-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2018
- uses: actions/setup-go@v3
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: .go-version
2321
- name: Run check/update
2422
uses: magefile/mage-action@v2
2523
with:

.github/workflows/golangci-lint.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,9 @@ jobs:
2828

2929
- uses: actions/checkout@v3
3030

31-
# Uses Go version from the repository.
32-
- name: Read .go-version file
33-
id: goversion
34-
run: echo "::set-output name=version::$(cat .go-version)"
35-
3631
- uses: actions/setup-go@v3
3732
with:
38-
go-version: "${{ steps.goversion.outputs.version }}"
33+
go-version-file: .go-version
3934

4035
- name: golangci-lint
4136
env:

.github/workflows/macos-auditbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
runs-on: macos-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Fetch Go version from .go-version
22-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2321
- uses: actions/setup-go@v3
2422
with:
25-
go-version: ${{ env.GO_VERSION }}
23+
go-version-file: .go-version
2624
- uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.9'

.github/workflows/macos-filebeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
runs-on: macos-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Fetch Go version from .go-version
22-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2321
- uses: actions/setup-go@v3
2422
with:
25-
go-version: ${{ env.GO_VERSION }}
23+
go-version-file: .go-version
2624
- uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.9'

.github/workflows/macos-heartbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
runs-on: macos-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Fetch Go version from .go-version
22-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2321
- uses: actions/setup-go@v3
2422
with:
25-
go-version: ${{ env.GO_VERSION }}
23+
go-version-file: .go-version
2624
- uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.9'

.github/workflows/macos-metricbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
runs-on: macos-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Fetch Go version from .go-version
22-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2321
- uses: actions/setup-go@v3
2422
with:
25-
go-version: ${{ env.GO_VERSION }}
23+
go-version-file: .go-version
2624
- uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.9'

.github/workflows/macos-packetbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
runs-on: macos-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Fetch Go version from .go-version
22-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2321
- uses: actions/setup-go@v3
2422
with:
25-
go-version: ${{ env.GO_VERSION }}
23+
go-version-file: .go-version
2624
- uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.9'

.github/workflows/macos-xpack-auditbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
runs-on: macos-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Fetch Go version from .go-version
22-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2321
- uses: actions/setup-go@v3
2422
with:
25-
go-version: ${{ env.GO_VERSION }}
23+
go-version-file: .go-version
2624
- uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.9'

.github/workflows/macos-xpack-filebeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
runs-on: macos-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Fetch Go version from .go-version
22-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2321
- uses: actions/setup-go@v3
2422
with:
25-
go-version: ${{ env.GO_VERSION }}
23+
go-version-file: .go-version
2624
- uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.9'

.github/workflows/macos-xpack-functionbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
runs-on: macos-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Fetch Go version from .go-version
22-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2321
- uses: actions/setup-go@v3
2422
with:
25-
go-version: ${{ env.GO_VERSION }}
23+
go-version-file: .go-version
2624
- uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.9'

.github/workflows/macos-xpack-heartbeat.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ jobs:
1818
runs-on: macos-latest
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Fetch Go version from .go-version
22-
run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV
2321
- uses: actions/setup-go@v3
2422
with:
25-
go-version: ${{ env.GO_VERSION }}
23+
go-version-file: .go-version
2624
- uses: actions/setup-python@v4
2725
with:
2826
python-version: '3.9'

0 commit comments

Comments
 (0)