diff --git a/action.yml b/action.yml index 4f8ff679..4708531a 100644 --- a/action.yml +++ b/action.yml @@ -24,12 +24,19 @@ branding: runs: using: composite steps: - # Set up the version of Python that supports pyodide - - uses: actions/setup-python@v5 - id: python - with: - python-version: "3.12" - update-environment: false + # PATCHED for self-hosted runner (offline): 原 actions/setup-python@v5 需联网校验 + # versions manifest,内网不可达;直接使用 toolcache 预置的 Python 3.12 + - id: python + run: | + for p in /opt/hostedtoolcache/Python/3.12*/x64/bin/python3.12 /usr/bin/python3.12 /usr/bin/python3; do + if [ -x "$p" ]; then + echo "python-path=$p" >> "$GITHUB_OUTPUT" + exit 0 + fi + done + echo "no usable python found" >&2 + exit 1 + shell: bash - id: cibw run: |