From 146735b0ed691ecf7cd7668b8369ed205d4288e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Thu, 6 Jun 2024 16:31:52 +0200 Subject: [PATCH] Use venv --- action.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index f96aef4..bd5c239 100644 --- a/action.yml +++ b/action.yml @@ -89,9 +89,6 @@ branding: runs: using: 'composite' steps: - - run: python3 -m pip install requests - shell: bash - - id: run-diffuse env: INPUT_OLD_FILE: ${{ inputs.old-file-path }} @@ -102,5 +99,13 @@ runs: INPUT_DIFFUSE_REPO: ${{ inputs.diffuse-repo }} INPUT_DEBUG: ${{ inputs.debug }} INPUT_GITHUB_TOKEN: ${{ github.token }} - run: python3 "$GITHUB_ACTION_PATH"/entrypoint.py + run: | + python3 -m venv "$GITHUB_ACTION_PATH"/diffuse-venv + if [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]]; then + source "$GITHUB_ACTION_PATH"/diffuse-venv/Scripts/activate + else + source "$GITHUB_ACTION_PATH"/diffuse-venv/bin/activate + fi + python3 -m pip install requests + python3 "$GITHUB_ACTION_PATH"/entrypoint.py shell: bash