diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 33129e4..d3fa133 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -21,7 +21,19 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Enable uv from toolcache + id: uv + run: | + uv_path="$(find /opt/hostedtoolcache/uv -maxdepth 4 -type f -name uv -perm -111 2>/dev/null | head -1)" + if [ -n "$uv_path" ]; then + dirname "$uv_path" >> "$GITHUB_PATH" + echo "found=true" >> "$GITHUB_OUTPUT" + else + echo "uv not found in toolcache" + fi + - name: Install uv + if: steps.uv.outputs.found != 'true' uses: astral-sh/setup-uv@v3 with: enable-cache: true @@ -72,7 +84,19 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Enable uv from toolcache + id: uv + run: | + uv_path="$(find /opt/hostedtoolcache/uv -maxdepth 4 -type f -name uv -perm -111 2>/dev/null | head -1)" + if [ -n "$uv_path" ]; then + dirname "$uv_path" >> "$GITHUB_PATH" + echo "found=true" >> "$GITHUB_OUTPUT" + else + echo "uv not found in toolcache" + fi + - name: Install uv + if: steps.uv.outputs.found != 'true' uses: astral-sh/setup-uv@v3 with: enable-cache: true