Skip to content

Commit 2e20b5f

Browse files
authored
Merge branch 'master' into flush/agents
2 parents 0059628 + 013cdea commit 2e20b5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1117
-1231
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757

5858
# Initializes the CodeQL tools for scanning.
5959
- name: Initialize CodeQL
60-
uses: github/codeql-action/init@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
60+
uses: github/codeql-action/init@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
6161
with:
6262
languages: ${{ matrix.language }}
6363
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -81,4 +81,4 @@ jobs:
8181
make clean build BUILD_RE2_WASM=1
8282
8383
- name: Perform CodeQL Analysis
84-
uses: github/codeql-action/analyze@b20883b0cd1f46c72ae0ba6d1090936928f9fa30 # v4.32.0
84+
uses: github/codeql-action/analyze@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3

.github/workflows/docker-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
buildkitd-config: .github/buildkit.toml
4040

4141
- name: "Build image"
42-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
42+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
4343
with:
4444
context: .
4545
file: ./build/docker/Dockerfile${{ matrix.flavor == 'debian' && '.debian' || '' }}
@@ -54,7 +54,7 @@ jobs:
5454
run: docker network create net-test
5555

5656
- name: Install uv
57-
uses: astral-sh/setup-uv@803947b9bd8e9f986429fa0c5a41c367cd732b41 # v7.2.1
57+
uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
5858
with:
5959
version: 0.5.24
6060
enable-cache: true

.github/workflows/go-tests-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@ jobs:
5858
- name: golangci-lint
5959
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
6060
with:
61-
version: v2.8
61+
version: v2.9
6262
args: --issues-exit-code=1 --timeout 10m
6363
only-new-issues: false

.github/workflows/go-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,6 @@ jobs:
214214
- name: golangci-lint
215215
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
216216
with:
217-
version: v2.8
217+
version: v2.9
218218
args: --issues-exit-code=1 --timeout 10m
219219
only-new-issues: false

.github/workflows/publish-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
9393
- name: Build and push image (slim)
9494
if: ${{ inputs.slim }}
95-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
95+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
9696
with:
9797
context: .
9898
file: ./build/docker/Dockerfile${{ inputs.debian && '.debian' || '' }}
@@ -108,7 +108,7 @@ jobs:
108108
BUILD_VERSION=${{ inputs.crowdsec_version }}
109109
110110
- name: Build and push image (full)
111-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
111+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
112112
with:
113113
context: .
114114
file: ./build/docker/Dockerfile${{ inputs.debian && '.debian' || '' }}

.github/workflows/version.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
description: "CrowdSec version/tag to deploy (e.g. v1.6.0). Leave empty to deploy latest release."
1010
required: false
1111
type: string
12+
date:
13+
description: "Deployment date (YYYY-MM-DDTHH:MM:SSZ). Cannot be empty if version is not empty."
14+
required: false
15+
type: string
1216

1317
jobs:
1418
deploy:
@@ -19,32 +23,42 @@ jobs:
1923
steps:
2024
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2125

22-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
26+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v4
2327
with:
2428
node-version: 20
2529

2630
- name: Pick CrowdSec version
2731
id: pick_version
2832
env:
2933
INPUT_VERSION: ${{ inputs.version }}
34+
INPUT_DATE: ${{ inputs.date }}
3035
GH_TOKEN: ${{ github.token }}
3136
run: |
3237
set -euo pipefail
3338
39+
if [ -n "${INPUT_VERSION:-}" ] && [ -z "${INPUT_DATE:-}" ]; then
40+
echo "Error: If version is provided, date must also be provided." >&2
41+
exit 1
42+
fi
43+
3444
if [ -n "${INPUT_VERSION:-}" ]; then
3545
TAG="${INPUT_VERSION}"
46+
DATE="${INPUT_DATE}"
3647
else
3748
# latest non-prerelease tag
38-
TAG="$(gh release list --json tagName --exclude-pre-releases --limit 1 | jq -r '.[0].tagName')"
49+
JSON_CONTENT="$(gh release list --json tagName,publishedAt --exclude-pre-releases --limit 1)"
50+
TAG="$(echo "$JSON_CONTENT" | jq -r '.[0].tagName')"
51+
DATE="$(echo "$JSON_CONTENT" | jq -r '.[0].publishedAt')"
3952
fi
4053
4154
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
55+
echo "date=$DATE" >> "$GITHUB_OUTPUT"
4256
4357
- name: Write dist artifact
4458
run: |
4559
set -euo pipefail
4660
mkdir -p ./dist
47-
echo '{"name":"${{ steps.pick_version.outputs.tag }}"}' > ./dist/latest
61+
echo '{"name":"${{ steps.pick_version.outputs.tag }}", "tag_name":"${{ steps.pick_version.outputs.tag }}", "published_at":"${{ steps.pick_version.outputs.date }}"}' > ./dist/latest
4862
cat ./dist/latest
4963
5064
# Deploy the build output directory (adjust ./dist to your framework output)

.golangci.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -597,11 +597,6 @@ linters:
597597
path: cmd/crowdsec/win_service.go
598598
text: 'deep-exit: .*'
599599

600-
- linters:
601-
- revive
602-
path: cmd/crowdsec/flags.go
603-
text: 'deep-exit: .*'
604-
605600
- linters:
606601
- revive
607602
path: cmd/crowdsec-cli/clisetup/setup/systemd_test.go

build/docker/test/.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12
1+
3.14

build/docker/test/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "crowdsec-docker-tests"
33
version = "0.1.0"
44
description = "Docker tests for Crowdsec"
55
readme = "README.md"
6-
requires-python = ">=3.12"
6+
requires-python = ">=3.14"
77
dependencies = [
88
"pytest>=8.3.4",
99
"pytest-cs>=0.7.24",

build/docker/test/tests/conftest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
from _pytest.config import Config
1+
2+
from __future__ import annotations
3+
4+
from typing import TYPE_CHECKING
5+
6+
if TYPE_CHECKING:
7+
from _pytest.config import Config
28

39
pytest_plugins = ("cs",)
410

0 commit comments

Comments
 (0)