fix gitea backend: install uv via shell, not setup-uv action
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user