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
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
uses: https://github.com/astral-sh/setup-uv@v4
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
with:
|
env:
|
||||||
version: latest
|
UV_INSTALL_DIR: /usr/local/bin
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --dev
|
run: uv sync --dev
|
||||||
|
|||||||
@@ -127,9 +127,9 @@ jobs:
|
|||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
uses: https://github.com/astral-sh/setup-uv@v4
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
with:
|
env:
|
||||||
version: latest
|
UV_INSTALL_DIR: /usr/local/bin
|
||||||
|
|
||||||
- name: Download scan results
|
- name: Download scan results
|
||||||
uses: https://github.com/actions/download-artifact@v4
|
uses: https://github.com/actions/download-artifact@v4
|
||||||
|
|||||||
@@ -127,9 +127,9 @@ jobs:
|
|||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
uses: https://github.com/astral-sh/setup-uv@v4
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
with:
|
env:
|
||||||
version: latest
|
UV_INSTALL_DIR: /usr/local/bin
|
||||||
|
|
||||||
- name: Download scan results
|
- name: Download scan results
|
||||||
uses: https://github.com/actions/download-artifact@v4
|
uses: https://github.com/actions/download-artifact@v4
|
||||||
|
|||||||
@@ -126,9 +126,9 @@ jobs:
|
|||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
uses: https://github.com/astral-sh/setup-uv@v4
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
with:
|
env:
|
||||||
version: latest
|
UV_INSTALL_DIR: /usr/local/bin
|
||||||
|
|
||||||
- name: Download scan results
|
- name: Download scan results
|
||||||
uses: https://github.com/actions/download-artifact@v4
|
uses: https://github.com/actions/download-artifact@v4
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ jobs:
|
|||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up uv
|
- name: Set up uv
|
||||||
uses: https://github.com/astral-sh/setup-uv@v4
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
with:
|
env:
|
||||||
version: latest
|
UV_INSTALL_DIR: /usr/local/bin
|
||||||
|
|
||||||
- name: Build package
|
- name: Build package
|
||||||
run: uv build --out-dir dist/
|
run: uv build --out-dir dist/
|
||||||
|
|||||||
@@ -32,11 +32,14 @@ def _setup_buildx_step() -> str:
|
|||||||
|
|
||||||
|
|
||||||
def _setup_uv_step(uv_version: str) -> 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
|
- name: Set up uv
|
||||||
uses: https://github.com/astral-sh/setup-uv@v4
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
with:
|
env:
|
||||||
version: {uv_version}"""
|
UV_INSTALL_DIR: /usr/local/bin"""
|
||||||
|
|
||||||
|
|
||||||
def _build_push_step(
|
def _build_push_step(
|
||||||
|
|||||||
Reference in New Issue
Block a user