From 5d943ec42144529bceb0f8efce01868daee0119c Mon Sep 17 00:00:00 2001 From: ljcornel Date: Wed, 5 Jun 2024 16:27:42 +0200 Subject: [PATCH 1/3] Run internal pypi build on self-hosted --- .github/workflows/build-package-internal-pypi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-package-internal-pypi.yaml b/.github/workflows/build-package-internal-pypi.yaml index 7adcab29..58082403 100644 --- a/.github/workflows/build-package-internal-pypi.yaml +++ b/.github/workflows/build-package-internal-pypi.yaml @@ -11,6 +11,7 @@ permissions: jobs: build: + runs-on: [self-hosted, sdk-runner] uses: ./.github/workflows/build-package.yaml with: enable_dev_dependencies: 1 From cf8506ebadcb08a100d6d11b3a8d40aa2320cb86 Mon Sep 17 00:00:00 2001 From: ljcornel Date: Wed, 5 Jun 2024 16:34:21 +0200 Subject: [PATCH 2/3] Parameterize runner for build job --- .github/workflows/build-package-internal-pypi.yaml | 2 +- .github/workflows/build-package-pypi.yaml | 1 + .github/workflows/build-package-test-pypi.yaml | 1 + .github/workflows/build-package.yaml | 5 ++++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-package-internal-pypi.yaml b/.github/workflows/build-package-internal-pypi.yaml index 58082403..be3ae161 100644 --- a/.github/workflows/build-package-internal-pypi.yaml +++ b/.github/workflows/build-package-internal-pypi.yaml @@ -11,10 +11,10 @@ permissions: jobs: build: - runs-on: [self-hosted, sdk-runner] uses: ./.github/workflows/build-package.yaml with: enable_dev_dependencies: 1 + runner: self-hosted secrets: PYPI_USER: ${{ secrets.SCLAB_PYPI_USERNAME }} PYPI_PASSWORD: ${{ secrets.SCLAB_PYPI_PASSWORD }} diff --git a/.github/workflows/build-package-pypi.yaml b/.github/workflows/build-package-pypi.yaml index 2f158466..d49360e2 100644 --- a/.github/workflows/build-package-pypi.yaml +++ b/.github/workflows/build-package-pypi.yaml @@ -11,6 +11,7 @@ jobs: uses: ./.github/workflows/build-package.yaml with: enable_dev_dependencies: 0 + runner: ubuntu-latest secrets: PYPI_USER: ${{ secrets.PYPI_USERNAME }} PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} diff --git a/.github/workflows/build-package-test-pypi.yaml b/.github/workflows/build-package-test-pypi.yaml index 864c76c2..a7a4d4a3 100644 --- a/.github/workflows/build-package-test-pypi.yaml +++ b/.github/workflows/build-package-test-pypi.yaml @@ -14,6 +14,7 @@ jobs: uses: ./.github/workflows/build-package.yaml with: enable_dev_dependencies: 1 + runner: ubuntu-latest secrets: PYPI_USER: ${{ secrets.TEST_PYPI_USERNAME }} PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }} diff --git a/.github/workflows/build-package.yaml b/.github/workflows/build-package.yaml index cc3c18db..c2424ad8 100644 --- a/.github/workflows/build-package.yaml +++ b/.github/workflows/build-package.yaml @@ -6,6 +6,9 @@ on: enable_dev_dependencies: required: false type: string + runner: + required: true + type: string secrets: PYPI_USER: required: true @@ -28,7 +31,7 @@ permissions: jobs: build_sdk: - runs-on: ubuntu-latest + runs-on: ${{ inputs.runner }} steps: - name: Harden Runner uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 From 25cab6f6ef425893c599edab394dc14232ebfa61 Mon Sep 17 00:00:00 2001 From: ljcornel Date: Wed, 5 Jun 2024 16:41:35 +0200 Subject: [PATCH 3/3] Fix workflow file --- .github/workflows/build-package-internal-pypi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-package-internal-pypi.yaml b/.github/workflows/build-package-internal-pypi.yaml index be3ae161..7eb99620 100644 --- a/.github/workflows/build-package-internal-pypi.yaml +++ b/.github/workflows/build-package-internal-pypi.yaml @@ -14,7 +14,7 @@ jobs: uses: ./.github/workflows/build-package.yaml with: enable_dev_dependencies: 1 - runner: self-hosted + runner: sdk-runner secrets: PYPI_USER: ${{ secrets.SCLAB_PYPI_USERNAME }} PYPI_PASSWORD: ${{ secrets.SCLAB_PYPI_PASSWORD }}