From 57e7d53102237d3c8f3e745ed8be27cc0e543819 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Tue, 6 Dec 2022 23:55:06 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9BEnsure=20the=20default=20`$PATH`=20?= =?UTF-8?q?value=20is=20pre-loaded?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch imports the system-global profile script to populate the `$PATH` variable with the typically available binary paths. Ref: https://github.com/pypa/gh-action-pypi-publish/issues/112#issuecomment-1340065840 --- .github/workflows/self-smoke-test-action.yml | 2 ++ twine-upload.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/self-smoke-test-action.yml b/.github/workflows/self-smoke-test-action.yml index 09fce6e..ae75ffc 100644 --- a/.github/workflows/self-smoke-test-action.yml +++ b/.github/workflows/self-smoke-test-action.yml @@ -84,6 +84,8 @@ jobs: }}/public/ - name: ✅ Smoke-test the locally checked out action uses: ./test + env: + PATH: utter-nonsense with: user: ${{ env.devpi-username }} password: ${{ env.devpi-password }} diff --git a/twine-upload.sh b/twine-upload.sh index c796ebe..690b8c2 100755 --- a/twine-upload.sh +++ b/twine-upload.sh @@ -5,6 +5,7 @@ set -Eeuo pipefail # NOTE: These variables are needed to combat GitHub passing broken env vars # NOTE: from the runner VM host runtime. # Ref: https://github.com/pypa/gh-action-pypi-publish/issues/112 +. /etc/profile # Makes python and other executables findable export PATH="$(python -m site --user-base)/bin:${PATH}" export PYTHONPATH="$(python -m site --user-site):${PYTHONPATH}"