From 4ff072cbd30b82ca31d257498a33b41df5698887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chareyron?= Date: Wed, 13 Nov 2024 17:06:39 +0100 Subject: [PATCH 1/2] Use uv instead of pip --- action.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/action.yaml b/action.yaml index a6440bd..9df39bf 100644 --- a/action.yaml +++ b/action.yaml @@ -48,12 +48,19 @@ inputs: runs: using: composite steps: + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Set up environment + run: uv venv + shell: bash + - id: install-local-requirements if: ${{ inputs.requirements-file-paths != '' }} run: | IFS=',' read -ra requirements_paths <<< "${{ inputs.requirements-file-paths }}" for req in ${requirements_paths[@]}; do - pip install -r $req + uv pip install -r $req done shell: bash @@ -61,19 +68,20 @@ runs: if: ${{ inputs.pyproject-toml-path != '' }} run: | cd $(dirname ${{ inputs.pyproject-toml-path }}) - pip install . + uv pip install . shell: bash - id: prefect-deploy run: | - pip install prefect -U "prefect>=3,<4" + uv pip install prefect -U "prefect>=3,<4" if [ ${{ inputs.all-deployments }} == "true" ]; then - prefect --no-prompt deploy --all --prefect-file "${{ inputs.deployment-file-path }}" + uv run prefect --no-prompt deploy --all --prefect-file "${{ inputs.deployment-file-path }}" else IFS=',' read -ra deployment_names <<< "${{ inputs.deployment-names }}" for name in "${deployment_names[@]}"; do - prefect --no-prompt deploy --prefect-file "${{ inputs.deployment-file-path }}" --name "$name" + uv run prefect --no-prompt deploy --prefect-file "${{ inputs.deployment-file-path }}" --name "$name" done fi shell: bash + \ No newline at end of file From 733202272a2d84d0c6436a5ce14212bce6ac24a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chareyron?= Date: Wed, 13 Nov 2024 19:05:28 +0100 Subject: [PATCH 2/2] Update action.yaml --- action.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/action.yaml b/action.yaml index 9df39bf..d3e036a 100644 --- a/action.yaml +++ b/action.yaml @@ -84,4 +84,3 @@ runs: done fi shell: bash - \ No newline at end of file