pypa / gh-action-pypi-publish

The blessed :octocat: GitHub Action, for publishing your :package: distribution files to PyPI, the tokenless way: https://github.com/marketplace/actions/pypi-publish
https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
BSD 3-Clause "New" or "Revised" License
930 stars 87 forks source link

Run in a self-hosted container without docker #274

Closed elderlabs closed 1 week ago

elderlabs commented 3 weeks ago

Greetings all,

This project seems like it can run without Docker. My self-hosted runner falls under an LXC container. What are the chances this project can support running in a self-hosted environment without it? From the Dockerfile, it would seem this is easily possible. My system already has a Python environement available to the runner. Worst case, I can tear everything apart and do it in a not-so-graceful way, but it'd be great if users like me were able to sidestep Docker altogether.

Thank you.

webknjaz commented 1 week ago

Sorry, this isn't in the scope of the action. If you're already doing such things, you probably won't benefit from using the action anyway since you wouldn't have access to OIDC / Trusted Publishing, which are the primary reasons for using it. I bet it would be much simpler for you to just invoke twine check --strict && twine upload. Using containers is a conscious choice to be able to rely on the isolation without having to mutate external environment.

elderlabs commented 1 week ago

OIDC / Trusted Publishing should still work in a self-hosted instance, per the documentation and discussion I've read related to it, though I'm not certain where it was I read that at the moment. I will likely do it myself with twine, as you've suggested.

Thank you for your time.

webknjaz commented 1 week ago

Yeah, I think I saw some mentions of that possibility requiring some sort of extra integration with GH.

@woodruffw do you know anything about OIDC in self-hosted runners?

woodruffw commented 1 week ago

Yeah, I think I saw some mentions of that possibility requiring some sort of extra integration with GH.

@woodruffw do you know anything about OIDC in self-hosted runners?

Not a ton, but my understanding is consistent with what @elderlabs said -- self-hosted runners associated with the normal "main" GitHub instance (github.com) should work just fine with OIDC.