🐛Ensure the default $PATH value is pre-loaded

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
This commit is contained in:
Sviatoslav Sydorenko 2022-12-06 23:55:06 +01:00
parent ce291dce5b
commit 57e7d53102
No known key found for this signature in database
GPG key ID: 9345E8FEA89CA455
2 changed files with 3 additions and 0 deletions

View file

@ -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 }}

View file

@ -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}"