fix: reinstall workflow deps on cached venvs
This commit is contained in:
@@ -28,6 +28,19 @@ jobs:
|
||||
git fetch origin main --depth=1
|
||||
git reset --hard FETCH_HEAD
|
||||
|
||||
- name: Setup Python Environment
|
||||
run: |
|
||||
VENV_BASE=/volume1/gitea/python_venv
|
||||
REQ_HASH=$(md5sum tools/validate_snapshot_admin_workflow_v1.py 2>/dev/null | cut -d' ' -f1 || echo "snapshot-admin-default")
|
||||
VENV="$VENV_BASE/$REQ_HASH"
|
||||
if [ ! -f "$VENV/bin/python" ]; then
|
||||
mkdir -p "$VENV_BASE"
|
||||
/usr/bin/python3 -m venv "$VENV"
|
||||
"$VENV/bin/pip" install --upgrade pip --quiet
|
||||
fi
|
||||
"$VENV/bin/pip" install pyyaml --quiet
|
||||
echo "$VENV/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Validate Snapshot Admin Workflow
|
||||
run: python3 tools/validate_snapshot_admin_workflow_v1.py
|
||||
|
||||
|
||||
Reference in New Issue
Block a user