diff --git a/.github/workflows/upload-pypi-core.yml b/.github/workflows/upload-pypi-core.yml index ab460ba0..f7af9b4c 100644 --- a/.github/workflows/upload-pypi-core.yml +++ b/.github/workflows/upload-pypi-core.yml @@ -6,11 +6,24 @@ on: - main paths: - "libs/core/**" + workflow_dispatch: + inputs: + security-token: + description: 'Security token to trigger this workflow' + required: true + type: string jobs: deploy: runs-on: ubuntu-latest steps: + - name: Check security token + run: | + if [[ "${{ github.event.inputs.security-token }}" != "${{ secrets.SECURITY_TOKEN }}" ]]; then + echo "Unauthorized access attempt detected." + exit 1 + fi + # Checkout the code - name: Checkout code uses: actions/checkout@v2 diff --git a/.github/workflows/upload-pypi-proxy.yml b/.github/workflows/upload-pypi-proxy.yml index 35b52fa8..424c5ef2 100644 --- a/.github/workflows/upload-pypi-proxy.yml +++ b/.github/workflows/upload-pypi-proxy.yml @@ -6,11 +6,23 @@ on: - main paths: - "libs/proxy/**" + workflow_dispatch: + inputs: + security-token: + description: 'Security token to trigger this workflow' + required: true + type: string jobs: deploy: runs-on: ubuntu-latest steps: + - name: Check security token + run: | + if [[ "${{ github.event.inputs.security-token }}" != "${{ secrets.SECURITY_TOKEN }}" ]]; then + echo "Unauthorized access attempt detected." + exit 1 + fi # Checkout the code - name: Checkout code uses: actions/checkout@v2 diff --git a/.github/workflows/upload-pypi-sdk.yml b/.github/workflows/upload-pypi-sdk.yml index 912d4b4f..0196cdc7 100644 --- a/.github/workflows/upload-pypi-sdk.yml +++ b/.github/workflows/upload-pypi-sdk.yml @@ -6,11 +6,23 @@ on: - main paths: - "libs/llmstudio/**" + workflow_dispatch: + inputs: + security-token: + description: 'Security token to trigger this workflow' + required: true + type: string jobs: deploy: runs-on: ubuntu-latest steps: + - name: Check security token + run: | + if [[ "${{ github.event.inputs.security-token }}" != "${{ secrets.SECURITY_TOKEN }}" ]]; then + echo "Unauthorized access attempt detected." + exit 1 + fi # Checkout the code - name: Checkout code uses: actions/checkout@v2 diff --git a/.github/workflows/upload-pypi-tracker.yml b/.github/workflows/upload-pypi-tracker.yml index bce63358..d8c990a2 100644 --- a/.github/workflows/upload-pypi-tracker.yml +++ b/.github/workflows/upload-pypi-tracker.yml @@ -6,11 +6,23 @@ on: - main paths: - "libs/tracker/**" + workflow_dispatch: + inputs: + security-token: + description: 'Security token to trigger this workflow' + required: true + type: string jobs: deploy: runs-on: ubuntu-latest steps: + - name: Check security token + run: | + if [[ "${{ github.event.inputs.security-token }}" != "${{ secrets.SECURITY_TOKEN }}" ]]; then + echo "Unauthorized access attempt detected." + exit 1 + fi # Checkout the code - name: Checkout code uses: actions/checkout@v2