add feature to use extra index URL
This commit is contained in:
@@ -21,6 +21,9 @@ on:
|
|||||||
run_security_scan:
|
run_security_scan:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
use_private_index:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
@@ -35,6 +38,17 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Configure private package index
|
||||||
|
if: ${{ inputs.use_private_index }}
|
||||||
|
env:
|
||||||
|
PRIVATE_INDEX_URL: ${{ secrets.PIP_EXTRA_INDEX_URL }}
|
||||||
|
run: |
|
||||||
|
if [ -z "$PRIVATE_INDEX_URL" ]; then
|
||||||
|
echo "use_private_index=true but the PIP_EXTRA_INDEX_URL secret is empty or not set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
pip config --site set global.extra-index-url "$PRIVATE_INDEX_URL"
|
||||||
|
|
||||||
- name: Install Tools & Deps
|
- name: Install Tools & Deps
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip setuptools wheel
|
python -m pip install --upgrade pip setuptools wheel
|
||||||
|
|||||||
Reference in New Issue
Block a user