CI: Update setup-go action to v4 (with automatic cache) (#2168)
This commit is contained in:
parent
85839b0199
commit
956703c31a
19
.github/workflows/bats-hub.yml
vendored
19
.github/workflows/bats-hub.yml
vendored
|
@ -27,28 +27,17 @@ jobs:
|
||||||
sudo chmod +w /etc/machine-id
|
sudo chmod +w /etc/machine-id
|
||||||
echo githubciXXXXXXXXXXXXXXXXXXXXXXXX | sudo tee /etc/machine-id
|
echo githubciXXXXXXXXXXXXXXXXXXXXXXXX | sudo tee /etc/machine-id
|
||||||
|
|
||||||
- name: "Set up Go ${{ matrix.go-version }}"
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: "Check out CrowdSec repository"
|
- name: "Check out CrowdSec repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: "Set up Go ${{ matrix.go-version }}"
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
go-version: ${{ matrix.go-version }}
|
||||||
~/go/pkg/mod
|
cache-dependency-path: "**/go.sum"
|
||||||
~/.cache/go-build
|
|
||||||
~/Library/Caches/go-build
|
|
||||||
%LocalAppData%\go-build
|
|
||||||
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ matrix.go-version }}-go-
|
|
||||||
|
|
||||||
- name: "Install bats dependencies"
|
- name: "Install bats dependencies"
|
||||||
env:
|
env:
|
||||||
|
|
19
.github/workflows/bats-mysql.yml
vendored
19
.github/workflows/bats-mysql.yml
vendored
|
@ -34,28 +34,17 @@ jobs:
|
||||||
sudo chmod +w /etc/machine-id
|
sudo chmod +w /etc/machine-id
|
||||||
echo githubciXXXXXXXXXXXXXXXXXXXXXXXX | sudo tee /etc/machine-id
|
echo githubciXXXXXXXXXXXXXXXXXXXXXXXX | sudo tee /etc/machine-id
|
||||||
|
|
||||||
- name: "Set up Go ${{ matrix.go-version }}"
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: "Check out CrowdSec repository"
|
- name: "Check out CrowdSec repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: "Set up Go ${{ matrix.go-version }}"
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
go-version: ${{ matrix.go-version }}
|
||||||
~/go/pkg/mod
|
cache-dependency-path: "**/go.sum"
|
||||||
~/.cache/go-build
|
|
||||||
~/Library/Caches/go-build
|
|
||||||
%LocalAppData%\go-build
|
|
||||||
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ matrix.go-version }}-go-
|
|
||||||
|
|
||||||
- name: "Install bats dependencies"
|
- name: "Install bats dependencies"
|
||||||
env:
|
env:
|
||||||
|
|
19
.github/workflows/bats-postgres.yml
vendored
19
.github/workflows/bats-postgres.yml
vendored
|
@ -35,28 +35,17 @@ jobs:
|
||||||
sudo chmod +w /etc/machine-id
|
sudo chmod +w /etc/machine-id
|
||||||
echo githubciXXXXXXXXXXXXXXXXXXXXXXXX | sudo tee /etc/machine-id
|
echo githubciXXXXXXXXXXXXXXXXXXXXXXXX | sudo tee /etc/machine-id
|
||||||
|
|
||||||
- name: "Set up Go ${{ matrix.go-version }}"
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: "Check out CrowdSec repository"
|
- name: "Check out CrowdSec repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: "Set up Go ${{ matrix.go-version }}"
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
go-version: ${{ matrix.go-version }}
|
||||||
~/go/pkg/mod
|
cache-dependency-path: "**/go.sum"
|
||||||
~/.cache/go-build
|
|
||||||
~/Library/Caches/go-build
|
|
||||||
%LocalAppData%\go-build
|
|
||||||
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ matrix.go-version }}-go-
|
|
||||||
|
|
||||||
- name: "Install bats dependencies"
|
- name: "Install bats dependencies"
|
||||||
env:
|
env:
|
||||||
|
|
19
.github/workflows/bats-sqlite-coverage.yml
vendored
19
.github/workflows/bats-sqlite-coverage.yml
vendored
|
@ -24,28 +24,17 @@ jobs:
|
||||||
sudo chmod +w /etc/machine-id
|
sudo chmod +w /etc/machine-id
|
||||||
echo githubciXXXXXXXXXXXXXXXXXXXXXXXX | sudo tee /etc/machine-id
|
echo githubciXXXXXXXXXXXXXXXXXXXXXXXX | sudo tee /etc/machine-id
|
||||||
|
|
||||||
- name: "Set up Go ${{ matrix.go-version }}"
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: "Check out CrowdSec repository"
|
- name: "Check out CrowdSec repository"
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: "Set up Go ${{ matrix.go-version }}"
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
go-version: ${{ matrix.go-version }}
|
||||||
~/go/pkg/mod
|
cache-dependency-path: "**/go.sum"
|
||||||
~/.cache/go-build
|
|
||||||
~/Library/Caches/go-build
|
|
||||||
%LocalAppData%\go-build
|
|
||||||
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ matrix.go-version }}-go-
|
|
||||||
|
|
||||||
- name: "Install bats dependencies"
|
- name: "Install bats dependencies"
|
||||||
env:
|
env:
|
||||||
|
|
19
.github/workflows/ci-windows-build-msi.yml
vendored
19
.github/workflows/ci-windows-build-msi.yml
vendored
|
@ -30,28 +30,17 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: "Set up Go ${{ matrix.go-version }}"
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: false
|
submodules: false
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: "Set up Go ${{ matrix.go-version }}"
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
go-version: ${{ matrix.go-version }}
|
||||||
~/go/pkg/mod
|
cache-dependency-path: "**/go.sum"
|
||||||
~/.cache/go-build
|
|
||||||
~/Library/Caches/go-build
|
|
||||||
%LocalAppData%\go-build
|
|
||||||
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ matrix.go-version }}-go-
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make windows_installer BUILD_RE2_WASM=1
|
run: make windows_installer BUILD_RE2_WASM=1
|
||||||
|
|
12
.github/workflows/docker-tests.yml
vendored
12
.github/workflows/docker-tests.yml
vendored
|
@ -30,18 +30,6 @@ jobs:
|
||||||
with:
|
with:
|
||||||
config: .github/buildkit.toml
|
config: .github/buildkit.toml
|
||||||
|
|
||||||
# - name: "Build flavor: full"
|
|
||||||
# uses: docker/build-push-action@v4
|
|
||||||
# with:
|
|
||||||
# context: .
|
|
||||||
# file: ./Dockerfile
|
|
||||||
# tags: crowdsecurity/crowdsec:test
|
|
||||||
# target: full
|
|
||||||
# platforms: linux/amd64
|
|
||||||
# load: true
|
|
||||||
# cache-from: type=gha
|
|
||||||
# cache-to: type=gha,mode=min
|
|
||||||
|
|
||||||
- name: "Build flavor: slim"
|
- name: "Build flavor: slim"
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
|
|
19
.github/workflows/go-tests-windows.yml
vendored
19
.github/workflows/go-tests-windows.yml
vendored
|
@ -29,28 +29,17 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: "Set up Go ${{ matrix.go-version }}"
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: Check out CrowdSec repository
|
- name: Check out CrowdSec repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: false
|
submodules: false
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: "Set up Go ${{ matrix.go-version }}"
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
go-version: ${{ matrix.go-version }}
|
||||||
~/go/pkg/mod
|
cache-dependency-path: "**/go.sum"
|
||||||
~/.cache/go-build
|
|
||||||
~/Library/Caches/go-build
|
|
||||||
%LocalAppData%\go-build
|
|
||||||
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ matrix.go-version }}-go-
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
|
19
.github/workflows/go-tests.yml
vendored
19
.github/workflows/go-tests.yml
vendored
|
@ -110,28 +110,17 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: "Set up Go ${{ matrix.go-version }}"
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: Check out CrowdSec repository
|
- name: Check out CrowdSec repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: false
|
submodules: false
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: "Set up Go ${{ matrix.go-version }}"
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
go-version: ${{ matrix.go-version }}
|
||||||
~/go/pkg/mod
|
cache-dependency-path: "**/go.sum"
|
||||||
~/.cache/go-build
|
|
||||||
~/Library/Caches/go-build
|
|
||||||
%LocalAppData%\go-build
|
|
||||||
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ matrix.go-version }}-go-
|
|
||||||
|
|
||||||
- name: Build and run tests, static
|
- name: Build and run tests, static
|
||||||
run: |
|
run: |
|
||||||
|
|
19
.github/workflows/release_publish-package.yml
vendored
19
.github/workflows/release_publish-package.yml
vendored
|
@ -20,28 +20,17 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: "Set up Go ${{ matrix.go-version }}"
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: ${{ matrix.go-version }}
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: false
|
submodules: false
|
||||||
|
|
||||||
- name: Cache Go modules
|
- name: "Set up Go ${{ matrix.go-version }}"
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
go-version: ${{ matrix.go-version }}
|
||||||
~/go/pkg/mod
|
cache-dependency-path: "**/go.sum"
|
||||||
~/.cache/go-build
|
|
||||||
~/Library/Caches/go-build
|
|
||||||
%LocalAppData%\go-build
|
|
||||||
key: ${{ runner.os }}-${{ matrix.go-version }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ matrix.go-version }}-go-
|
|
||||||
|
|
||||||
- name: Build the binaries
|
- name: Build the binaries
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in a new issue