diff --git a/.gitea/workflows/python-checks.yml b/.gitea/workflows/python-checks.yml index e7c08b8..44aef5c 100644 --- a/.gitea/workflows/python-checks.yml +++ b/.gitea/workflows/python-checks.yml @@ -21,6 +21,9 @@ on: run_security_scan: type: boolean default: true + use_private_index: + type: boolean + default: false jobs: check: @@ -35,6 +38,17 @@ jobs: - name: Checkout 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 run: | python -m pip install --upgrade pip setuptools wheel