mirror of
https://gitcode.com/gh_mirrors/gh/gh-action-pypi-publish.git
synced 2026-07-02 18:27:49 +00:00
🐛 Avoid broken env vars passed by GHA from host
Fixes https://github.com/pypa/gh-action-pypi-publish/issues/112.
This commit is contained in:
@@ -2,6 +2,13 @@
|
|||||||
set -Eeuo pipefail
|
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
|
||||||
|
export PATH="$(python -m site --user-base)/bin:${PATH}"
|
||||||
|
export PYTHONPATH="$(python -m site --user-site):${PYTHONPATH}"
|
||||||
|
|
||||||
|
|
||||||
if [[
|
if [[
|
||||||
"$INPUT_USER" == "__token__" &&
|
"$INPUT_USER" == "__token__" &&
|
||||||
! "$INPUT_PASSWORD" =~ ^pypi-
|
! "$INPUT_PASSWORD" =~ ^pypi-
|
||||||
|
|||||||
Reference in New Issue
Block a user