From 2ebe891ca5b0d189997fbcee66037494949adff5 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 24 Aug 2022 10:43:11 +0100 Subject: [PATCH] actions: use v3 and mage install (#32780) --- .github/workflows/check-default.yml | 7 +++---- .github/workflows/check-docs.yml | 7 +++---- .github/workflows/check-packetbeat.yml | 7 +++---- .github/workflows/check-xpack-packetbeat.yml | 4 ++-- .github/workflows/macos-build.yml | 6 +++--- 5 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/check-default.yml b/.github/workflows/check-default.yml index e2aa374e4c9..304b5382c4a 100644 --- a/.github/workflows/check-default.yml +++ b/.github/workflows/check-default.yml @@ -16,14 +16,13 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Fetch Go version from .go-version run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Run check-default run: | - export PATH=$PATH:$(go env GOPATH)/bin - go install github.com/magefile/mage@latest + go install github.com/magefile/mage make check-default diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index fb7ea0fe1c5..4d56b80fa31 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -16,10 +16,10 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Fetch Go version from .go-version run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Install libpcap-dev @@ -30,6 +30,5 @@ jobs: run: sudo apt-get install -y librpm-dev - name: Run check run: | - export PATH=$PATH:$(go env GOPATH)/bin - go install github.com/magefile/mage@latest + go install github.com/magefile/mage make check diff --git a/.github/workflows/check-packetbeat.yml b/.github/workflows/check-packetbeat.yml index 937e5f7cf26..847e13e503f 100644 --- a/.github/workflows/check-packetbeat.yml +++ b/.github/workflows/check-packetbeat.yml @@ -14,17 +14,16 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Fetch Go version from .go-version run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Install libpcap-dev run: sudo apt-get install -y libpcap-dev - name: Run check/update run: | - export PATH=$PATH:$(go env GOPATH)/bin - go install github.com/magefile/mage@latest + go install github.com/magefile/mage make -C ${{ env.BEAT_MODULE }} check update make check-no-changes diff --git a/.github/workflows/check-xpack-packetbeat.yml b/.github/workflows/check-xpack-packetbeat.yml index 87ab877fc0d..5469bdaf80e 100644 --- a/.github/workflows/check-xpack-packetbeat.yml +++ b/.github/workflows/check-xpack-packetbeat.yml @@ -14,10 +14,10 @@ jobs: check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Fetch Go version from .go-version run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: go-version: ${{ env.GO_VERSION }} - name: Install libpcap-dev diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 6f392dff9e4..55c2d50fa3f 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -42,12 +42,12 @@ jobs: echo Changed GOPATH to ${{ env.MACOS_GOPATH }} echo "GOPATH="${{ env.MACOS_GOPATH }} >> $GITHUB_ENV - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: go-version: ${{ github.event.inputs.go_version }} - name: Install dependencies - run: go get -u github.com/magefile/mage - - uses: actions/checkout@v2 + run: go install github.com/magefile/mage + - uses: actions/checkout@v3 with: fetch-depth: 0 ref: ${{ env.GITHUB_REF }}