Skip to content

Commit e221b41

Browse files
fix: setup job install poetry without sudo (#291)
`sudo pip3 install poetry` causes issues with dependencies installation as runners `python` is being used instead of `python` checked out in earlier step. Tests: https://github.com/splunk/splunk-add-on-for-google-workspace/actions/runs/9612424171
1 parent 1980a42 commit e221b41

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ jobs:
338338
if [ -f "poetry.lock" ]
339339
then
340340
mkdir -p package/lib || true
341-
pip install poetry==1.5.1 poetry-plugin-export==1.4.0
341+
python${{ matrix.python-version }} -m pip install poetry==1.5.1 poetry-plugin-export==1.4.0
342342
poetry lock --check
343343
poetry export --without-hashes -o package/lib/requirements.txt
344344
poetry export --without-hashes --with dev -o requirements_dev.txt
@@ -389,7 +389,7 @@ jobs:
389389
if [ -f "poetry.lock" ]
390390
then
391391
mkdir -p package/lib || true
392-
pip install poetry==1.5.1 poetry-plugin-export==1.4.0
392+
python${{ matrix.python-version }} -m pip install poetry==1.5.1 poetry-plugin-export==1.4.0
393393
poetry lock --check
394394
poetry export --without-hashes -o package/lib/requirements.txt
395395
poetry export --without-hashes --with dev -o requirements_dev.txt
@@ -445,7 +445,7 @@ jobs:
445445
if [ -f "poetry.lock" ]
446446
then
447447
echo " poetry.lock found "
448-
sudo pip3 install poetry==1.5.1 poetry-plugin-export==1.4.0
448+
python3.7 -m pip install poetry==1.5.1 poetry-plugin-export==1.4.0
449449
poetry export --without-hashes -o requirements.txt
450450
if [ "$(grep -cve '^\s*$' requirements.txt)" -ne 0 ]
451451
then
@@ -617,7 +617,7 @@ jobs:
617617
if [ -f "poetry.lock" ]
618618
then
619619
echo " poetry.lock found "
620-
sudo pip3 install poetry==1.5.1 poetry-plugin-export==1.4.0
620+
python3.9 -m pip install poetry==1.5.1 poetry-plugin-export==1.4.0
621621
poetry export --without-hashes -o requirements.txt
622622
if [ "$(grep -cve '^\s*$' requirements.txt)" -ne 0 ]
623623
then
@@ -878,7 +878,7 @@ jobs:
878878
env:
879879
PYTHON_KEYRING_BACKEND: keyring.backends.null.Keyring
880880
run: |
881-
sudo pip3 install poetry==1.5.1
881+
python3.7 -m pip install poetry==1.5.1
882882
export POETRY_REPOSITORIES_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_URL=https://github.com/splunk/addonfactory-ucc-test.git
883883
export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_USERNAME=${{ secrets.SA_GH_USER_NAME }}
884884
export POETRY_HTTP_BASIC_SPLUNK_ADD_ON_UCC_MODINPUT_TEST_PASSWORD=${{ secrets.GH_TOKEN_ADMIN }}

0 commit comments

Comments
 (0)