fix gitea backend: install uv via shell, not setup-uv action
Some checks failed
Deploy / build (push) Failing after 9s
Deploy / scan (push) Has been skipped
Deploy / report-vulns (push) Has been skipped
CI / lint-test (push) Failing after 1m22s

astral-sh/setup-uv composite action makes internal API calls
that Gitea resolves against localhost, failing because astral-sh
isn't a local user. Use the official install script instead:
  curl -LsSf https://astral.sh/uv/install.sh | sh
This commit is contained in:
kert
2026-03-23 21:38:20 -04:00
parent 1c381360fd
commit c1e2ac6eaa
6 changed files with 22 additions and 19 deletions

View File

@@ -16,9 +16,9 @@ jobs:
uses: https://github.com/actions/checkout@v4
- name: Set up uv
uses: https://github.com/astral-sh/setup-uv@v4
with:
version: latest
run: curl -LsSf https://astral.sh/uv/install.sh | sh
env:
UV_INSTALL_DIR: /usr/local/bin
- name: Install dependencies
run: uv sync --dev

View File

@@ -127,9 +127,9 @@ jobs:
uses: https://github.com/actions/checkout@v4
- name: Set up uv
uses: https://github.com/astral-sh/setup-uv@v4
with:
version: latest
run: curl -LsSf https://astral.sh/uv/install.sh | sh
env:
UV_INSTALL_DIR: /usr/local/bin
- name: Download scan results
uses: https://github.com/actions/download-artifact@v4

View File

@@ -127,9 +127,9 @@ jobs:
uses: https://github.com/actions/checkout@v4
- name: Set up uv
uses: https://github.com/astral-sh/setup-uv@v4
with:
version: latest
run: curl -LsSf https://astral.sh/uv/install.sh | sh
env:
UV_INSTALL_DIR: /usr/local/bin
- name: Download scan results
uses: https://github.com/actions/download-artifact@v4

View File

@@ -126,9 +126,9 @@ jobs:
uses: https://github.com/actions/checkout@v4
- name: Set up uv
uses: https://github.com/astral-sh/setup-uv@v4
with:
version: latest
run: curl -LsSf https://astral.sh/uv/install.sh | sh
env:
UV_INSTALL_DIR: /usr/local/bin
- name: Download scan results
uses: https://github.com/actions/download-artifact@v4

View File

@@ -15,9 +15,9 @@ jobs:
uses: https://github.com/actions/checkout@v4
- name: Set up uv
uses: https://github.com/astral-sh/setup-uv@v4
with:
version: latest
run: curl -LsSf https://astral.sh/uv/install.sh | sh
env:
UV_INSTALL_DIR: /usr/local/bin
- name: Build package
run: uv build --out-dir dist/

View File

@@ -32,11 +32,14 @@ def _setup_buildx_step() -> str:
def _setup_uv_step(uv_version: str) -> str:
return f"""\
# astral-sh/setup-uv is a composite action that calls the Gitea API
# internally, which fails because 'astral-sh' isn't a local user.
# Install uv directly via the official installer script instead.
return """\
- name: Set up uv
uses: https://github.com/astral-sh/setup-uv@v4
with:
version: {uv_version}"""
run: curl -LsSf https://astral.sh/uv/install.sh | sh
env:
UV_INSTALL_DIR: /usr/local/bin"""
def _build_push_step(