From 000e6530386433ff3800f9e0b2d01754ce159c48 Mon Sep 17 00:00:00 2001 From: Feng Ruohang Date: Sat, 24 Oct 2026 12:42:50 +0800 Subject: [PATCH] ci: use runner Python for repository card checks Signed-off-by: Feng Ruohang --- .github/workflows/repository-cards.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/repository-cards.yml b/.github/workflows/repository-cards.yml index d313d2757..4f65babb0 100644 --- a/.github/workflows/repository-cards.yml +++ b/.github/workflows/repository-cards.yml @@ -34,10 +34,11 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: persist-credentials: false - - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 - with: - python-version: "3.13" - - run: python -m pip install -r buildscripts/repository-cards/requirements.txt + - name: Use the runner's Python in an isolated environment + run: | + python3 -m venv "$RUNNER_TEMP/repository-cards-venv" + "$RUNNER_TEMP/repository-cards-venv/bin/python" -m pip install -r buildscripts/repository-cards/requirements.txt + echo "$RUNNER_TEMP/repository-cards-venv/bin" >> "$GITHUB_PATH" - run: python -m unittest discover -s buildscripts/repository-cards -p 'test_*.py' -v publish: @@ -54,10 +55,11 @@ jobs: OUTPUT_BRANCH: codex/repository-cards steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 - with: - python-version: "3.13" - - run: python -m pip install -r buildscripts/repository-cards/requirements.txt + - name: Use the runner's Python in an isolated environment + run: | + python3 -m venv "$RUNNER_TEMP/repository-cards-venv" + "$RUNNER_TEMP/repository-cards-venv/bin/python" -m pip install -r buildscripts/repository-cards/requirements.txt + echo "$RUNNER_TEMP/repository-cards-venv/bin" >> "$GITHUB_PATH" - name: Load the generated-assets branch shell: bash