From f71367133f154f1238dc68ff2edce2740e887678 Mon Sep 17 00:00:00 2001 From: Brett Logan Date: Tue, 22 Feb 2022 10:24:08 -0500 Subject: [PATCH] Change venv path --- .github/scripts/update-python.sh | 9 +++++---- .github/workflows/deps-python.yml | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/scripts/update-python.sh b/.github/scripts/update-python.sh index b3a7ebb5..dea47527 100755 --- a/.github/scripts/update-python.sh +++ b/.github/scripts/update-python.sh @@ -11,7 +11,8 @@ set -euo pipefail ############################ # Create staging directory # ############################ -mkdir -p /venvs +# shellcheck disable=SC2154 +mkdir -p "${working_directory}/venvs" ######################################## # Install basic libs to run installers # @@ -26,9 +27,9 @@ for DEP_FILE in *.txt; do # split the package name from its version PACKAGE_NAME=${DEP_FILE%.txt} echo "-------------------------------------------" - mkdir -p "/venvs/${PACKAGE_NAME}" + mkdir -p "${working_directory}/venvs/${PACKAGE_NAME}" echo "Generating virtualenv for: [${PACKAGE_NAME}]" - pushd "/venvs/${PACKAGE_NAME}" + pushd "${working_directory}/venvs/${PACKAGE_NAME}" # Enable virtualenv virtualenv . # Activate virtualenv @@ -48,7 +49,7 @@ for DEP_FILE in *.txt; do # Remove old lockfile rm -rf "$DEP_FILE" # Create new lockfile - mv "/venvs/${PACKAGE_NAME}/requirements.txt" "${DEP_FILE}" + mv "${working_directory}/venvs/${PACKAGE_NAME}/requirements.txt" "${DEP_FILE}" done git status diff --git a/.github/workflows/deps-python.yml b/.github/workflows/deps-python.yml index 4cde252a..42ec2f49 100644 --- a/.github/workflows/deps-python.yml +++ b/.github/workflows/deps-python.yml @@ -13,3 +13,4 @@ jobs: - run: ./.github/scripts/update-python.sh env: id: ${{ github.run_id }} + working_directory: ${{ github.workspace }}