From bcf08084584269d4234be7191e624ee237ca7789 Mon Sep 17 00:00:00 2001 From: Thomas Schmelzer Date: Sun, 5 Jan 2025 08:18:41 +0400 Subject: [PATCH] actions based on astral-sh/setup-uv action --- actions/uv/build/action.yml | 12 ++++++------ actions/uv/core/action.yml | 4 +++- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/actions/uv/build/action.yml b/actions/uv/build/action.yml index 1f837c68..697ed21f 100644 --- a/actions/uv/build/action.yml +++ b/actions/uv/build/action.yml @@ -29,18 +29,18 @@ runs: using: "composite" steps: + # Install uv - name: Install uv - shell: bash - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - echo "$HOME/.cargo/bin" >> $GITHUB_PATH + uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a + with: + python-version: ${{ inputs.python-version }} - name: Set up Python environment with uv shell: bash working-directory: ${{ inputs.working-directory }} run: | - # Create venv with specific Python version - uv venv --python ${{ inputs.python-version }} + # Create venv + uv venv # Add venv to PATH echo ".venv/bin" >> $GITHUB_PATH uv sync --all-extras --dev --frozen diff --git a/actions/uv/core/action.yml b/actions/uv/core/action.yml index 83e28136..3e62ceb4 100644 --- a/actions/uv/core/action.yml +++ b/actions/uv/core/action.yml @@ -17,11 +17,13 @@ runs: # Install uv - name: Install uv uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a + with: + python-version: ${{ inputs.python-version }} + - name: Set up Python and install dependencies shell: bash working-directory: ${{ inputs.working-directory }} run: | - uv python install ${{ inputs.python-version }} uv venv uv pip install --no-cache-dir -r requirements.txt