actions / actions/setup-python
Optional ability to set the pypi repository and credentials to be used by pip on the runner
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.2k
- Forks
- 739
- Ø Merge
- 6 T. 18 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Description:
Add option with flags to allow users of the action to setup a pip.conf or pip.ini file with a private registry and credentials.
Example usage:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
repository: ${{ secrets.PYPI_REPO_URL }}
username: ${{ secrets.PYPI_USER_TOKEN }}
password: ${{ secrets.PYPI_PASS_TOKEN }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
Justification:
Using this action on ephemeral runners in environments where where companies have their own repository's to cache python dependencies. Great example (and my use case) is an enterprise nexus pypi repo where the open source pypi is blocked by firewall and dependencies need to be security scanned and placed in nexus prior to use internally. Having one setup-python action run and have the runner configured properly to use pip in any environment prevents the clutter having to manually write a pip.conf/pip.ini file every time we want to pip install.
Are you willing to submit a PR?
Absolutely, I am new to typescript but would love to put in a PR if others agree the work is useful.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die vorhandenen Inputs der setup-python-Action und den Ablauf der Runner-Einrichtung zu prüfen, und ermittle anschließend, wie pip.conf oder pip.ini für private Repositories und Zugangsdaten konfiguriert werden würden. Als abgeschlossen gilt die Aufgabe, wenn die Action die angeforderten Repository- und Zugangsdaten-Inputs akzeptieren und pip für nachfolgende Installationen konfigurieren kann und das Verhalten in den unterstützten Runner-Umgebungen validiert wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, typescript
- Bereich
- ci-cd, devops
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100