actions / actions/setup-python
Optional ability to set the pypi repository and credentials to be used by pip on the runner
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 2.2k
- Fork
- 739
- Merge medio
- 6g 18h
- PR unite (30g)
- 1
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando gli input esistenti dell’action setup-python e il flusso di configurazione del runner, quindi determina come configurare pip.conf o pip.ini per repository privati e credenziali. Il lavoro è completato quando l’action può accettare gli input richiesti per il repository e le credenziali, configurare pip per le installazioni successive e il comportamento è stato convalidato negli ambienti runner supportati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python, typescript
- Ambito
- ci-cd, devops
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100