CI / build-and-scan (push) Successful in 47s
- release changelog: commits rendered as description (link), divider lines dropped - gitleaks secret scan and hadolint on every push/PR - ruff lint/format gate (Python repos) with a pytest --cov-fail-under gate - scheduled CRITICAL Trivy failures attempt an apk upgrade rebuild and open a follow-up PR if it clears the finding, instead of just failing red - images also published to ghcr.io/djeex/<repo> - a matching GitHub Release is created on the GitHub mirror, with a notice pointing back to this repo as the source of truth --------- Co-authored-by: Djeex <[email protected]> Reviewed-on: #17
30 lines
657 B
Docker
30 lines
657 B
Docker
FROM python:3.14.7-alpine AS base
|
|
|
|
ENV TZ=Europe/Paris
|
|
|
|
RUN apk add --no-cache tzdata curl su-exec \
|
|
&& cp /usr/share/zoneinfo/$TZ /etc/localtime \
|
|
&& echo $TZ > /etc/timezone
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY blocklist_scheduler.py entrypoint.sh VERSION ./
|
|
RUN chmod +x entrypoint.sh
|
|
|
|
FROM base AS test
|
|
RUN pip install --no-cache-dir pytest==9.1.1 pytest-cov==7.1.0
|
|
COPY tests/ tests/
|
|
COPY pytest.ini .
|
|
|
|
FROM base AS lint
|
|
RUN pip install --no-cache-dir ruff==0.16.4
|
|
COPY ruff.toml .
|
|
COPY tests/ tests/
|
|
RUN ruff check . && ruff format --check .
|
|
|
|
FROM base
|
|
ENTRYPOINT ["./entrypoint.sh"]
|