ci: avoid GitHub action downloads #2

Merged
Jacky merged 6 commits from fix/gitea-actions-mirror into main 2026-08-08 23:52:14 +08:00
3 changed files with 19 additions and 4 deletions
Showing only changes of commit 1f800d713f - Show all commits
+9 -2
View File
@@ -36,7 +36,11 @@ jobs:
- name: Install dependencies
run: |
python3 -m venv .venv-ci
.venv-ci/bin/python -m pip install -r requirements-dev.txt
.venv-ci/bin/python -m pip install \
--index-url https://mirrors.aliyun.com/pypi/simple \
--timeout 120 \
--retries 5 \
-r requirements-dev.txt
- name: Check migrations
working-directory: backend
run: ../.venv-ci/bin/python manage.py makemigrations --check --dry-run
@@ -57,4 +61,7 @@ jobs:
.venv-ci/bin/python backend/manage.py migrate --noinput
.venv-ci/bin/python -m pytest -q
- name: Build image
run: docker build -t hulumath:${{ gitea.sha }} .
run: |
docker build \
--build-arg PIP_INDEX_URL=https://mirrors.aliyun.com/pypi/simple \
-t hulumath:${{ gitea.sha }} .
+5 -1
View File
@@ -43,7 +43,11 @@ jobs:
- name: 安装测试依赖
run: |
python3 -m venv .venv-ci
.venv-ci/bin/python -m pip install -r requirements-dev.txt
.venv-ci/bin/python -m pip install \
--index-url https://mirrors.aliyun.com/pypi/simple \
--timeout 120 \
--retries 5 \
-r requirements-dev.txt
- name: 检查迁移文件
working-directory: backend
+5 -1
View File
@@ -1,8 +1,12 @@
FROM python:3.11-slim AS runtime
ARG PIP_INDEX_URL=https://pypi.org/simple
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PIP_INDEX_URL=$PIP_INDEX_URL \
PIP_DEFAULT_TIMEOUT=120
WORKDIR /app