From d94a4d3ce5988e79e8973f96e83687badcb97e57 Mon Sep 17 00:00:00 2001 From: Dipika Sikka Date: Wed, 3 Apr 2024 16:21:07 +0000 Subject: [PATCH] move to other job --- .github/workflows/build-wheel-and-container.yml | 6 ++++-- .github/workflows/pull-whl-and-test.yml | 14 +++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-wheel-and-container.yml b/.github/workflows/build-wheel-and-container.yml index c564aacaad9..7928ffe86be 100644 --- a/.github/workflows/build-wheel-and-container.yml +++ b/.github/workflows/build-wheel-and-container.yml @@ -65,21 +65,23 @@ jobs: with: build-label: ubuntu-20.04 whl: ${{ needs.build-wheel-and-push.outputs.wheel }} + internal: ${{ needs.set-outputs.outputs.internal }} secrets: inherit + """ push-to-internal-pypi: - if: $INTERNAL needs: pull-wheel-and-test runs-on: ubuntu-latest steps: - name: Push to internal pypi + if: ${{ env.INTERNAL == 'true' }} uses: neuralmagic/nm-actions/actions/nm-upload-whl@upload-pypi with: python: '3.10' server: ${{ secrets.NM_PRIVATE_PYPI_LOCATION }} username: ${{ secrets.NM_PRIVATE_PYPI_USER }} password: ${{ secrets.NM_PRIVATE_PYPI_AUTH }} - + """ build-container-and-push: needs: pull-wheel-and-test diff --git a/.github/workflows/pull-whl-and-test.yml b/.github/workflows/pull-whl-and-test.yml index 359db32d41d..8a5ee78af8c 100644 --- a/.github/workflows/pull-whl-and-test.yml +++ b/.github/workflows/pull-whl-and-test.yml @@ -9,6 +9,9 @@ on: whl: type: string required: true + internal: + type: string + jobs: pull-wheel-and-test: @@ -44,4 +47,13 @@ jobs: - name: Remove src files and run tests run: | rm -rf src - make test \ No newline at end of file + make test + + - name: Push to internal pypi + if: ${{ inputs.internal == 'true' }} + uses: neuralmagic/nm-actions/actions/nm-upload-whl@upload-pypi + with: + python: '3.10' + server: ${{ secrets.NM_PRIVATE_PYPI_LOCATION }} + username: ${{ secrets.NM_PRIVATE_PYPI_USER }} + password: ${{ secrets.NM_PRIVATE_PYPI_AUTH }}