This commit is contained in:
+34
-3
@@ -16,11 +16,42 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: docker build -t adguard-cidre:ci .
|
run: |
|
||||||
|
docker build -t adguard-cidre:ci . 2>&1 | tee build.log
|
||||||
|
if grep -q "Building wheel for" build.log; then
|
||||||
|
echo "::warning::Une dépendance a compilé depuis les sources — vérifie la compatibilité Python/Alpine"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Scan with Trivy
|
- name: Smoke test
|
||||||
|
run: |
|
||||||
|
set +e
|
||||||
|
timeout 10s docker run --rm adguard-cidre:ci python blocklist_scheduler.py
|
||||||
|
code=$?
|
||||||
|
set -e
|
||||||
|
if [ "$code" -eq 124 ]; then
|
||||||
|
echo "OK: le script tourne toujours après 10s (timeout normal)"
|
||||||
|
elif [ "$code" -ne 0 ]; then
|
||||||
|
echo "::error::Le script a crashé au démarrage (code $code)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Check deprecation warnings
|
||||||
|
run: |
|
||||||
|
docker run --rm adguard-cidre:ci python -W error::DeprecationWarning -c "import blocklist_scheduler" 2>&1 | tee deprecation.log || true
|
||||||
|
if grep -qi "deprecat" deprecation.log; then
|
||||||
|
echo "::warning::Avertissement de dépréciation détecté, voir logs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Scan with Trivy (critical - blocking)
|
||||||
run: |
|
run: |
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
-e DOCKER_HOST=tcp://dockerhost:2375 \
|
-e DOCKER_HOST=tcp://dockerhost:2375 \
|
||||||
--add-host=dockerhost:host-gateway \
|
--add-host=dockerhost:host-gateway \
|
||||||
aquasec/trivy:0.74.0 image --exit-code 0 --severity HIGH,CRITICAL adguard-cidre:ci
|
aquasec/trivy:0.74.0 image --exit-code 1 --severity CRITICAL adguard-cidre:ci
|
||||||
|
|
||||||
|
- name: Scan with Trivy (high - informative)
|
||||||
|
run: |
|
||||||
|
docker run --rm \
|
||||||
|
-e DOCKER_HOST=tcp://dockerhost:2375 \
|
||||||
|
--add-host=dockerhost:host-gateway \
|
||||||
|
aquasec/trivy:0.74.0 image --exit-code 0 --severity HIGH adguard-cidre:ci
|
||||||
Reference in New Issue
Block a user