From 6d7d6ef02f59ded397708f3d9243fa335188e5c6 Mon Sep 17 00:00:00 2001 From: Chris Andreae Date: Wed, 24 Jul 2024 16:16:44 +0900 Subject: [PATCH] Patch metadata-validation Github action: add python virtualenv The upstream hardware-metadata-validation action presently fails to install python dependencies with a permissions error for the pip cache directory. Until it's fixed upstream, use a virtualenv. --- .github/workflows/hardware-metadata-validation.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/hardware-metadata-validation.yml b/.github/workflows/hardware-metadata-validation.yml index 716cd976277..bbd3a1120f6 100644 --- a/.github/workflows/hardware-metadata-validation.yml +++ b/.github/workflows/hardware-metadata-validation.yml @@ -21,6 +21,13 @@ jobs: image: docker.io/zmkfirmware/zmk-dev-arm:3.5 steps: - uses: actions/checkout@v4 + - name: Setup Python virtual environment + run: | + apt install python3.12-venv + python3 -m venv /tmp/venv + source /tmp/venv/bin/activate + echo VIRTUAL_ENV="$VIRTUAL_ENV" >> $GITHUB_ENV + echo PATH="$PATH" >> $GITHUB_ENV - name: Install dependencies run: pip install -r app/scripts/requirements.txt - name: West init