From 31e558de9658ccdfc98348e28c62c12d2440a8b6 Mon Sep 17 00:00:00 2001 From: Petro Tiurin <93913847+ptiurin@users.noreply.github.com> Date: Mon, 27 Nov 2023 15:03:26 +0000 Subject: [PATCH] ci: Fix secrets in release action (#324) --- .github/workflows/integration-tests-v1.yml | 14 ++++++-------- .github/workflows/integration-tests-v2.yml | 6 ------ .github/workflows/integration-tests.yml | 16 ++++++++-------- .github/workflows/release.yml | 4 ++++ 4 files changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/integration-tests-v1.yml b/.github/workflows/integration-tests-v1.yml index 4bf9f053ace..aaf5f9329fa 100644 --- a/.github/workflows/integration-tests-v1.yml +++ b/.github/workflows/integration-tests-v1.yml @@ -16,10 +16,6 @@ on: default: 'staging' required: false type: string - branch: - required: false - type: string - description: 'Branch to run on' secrets: FIREBOLT_USERNAME: required: true @@ -33,14 +29,16 @@ on: required: true SERVICE_SECRET: required: true + SERVICE_ID_STG: + required: true + SERVICE_SECRET_STG: + required: true jobs: tests: runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v2 - with: - ref: ${{ inputs.branch }} - name: Set up Python 3.7 uses: actions/setup-python@v2 @@ -62,8 +60,8 @@ jobs: else echo "USERNAME=${{ secrets.FIREBOLT_USERNAME }}" >> "$GITHUB_ENV" echo "PASSWORD=${{ secrets.FIREBOLT_PASSWORD }}" >> "$GITHUB_ENV" - echo "CLIENT_ID=${{ secrets.FIREBOLT_CLIENT_ID }}" >> "$GITHUB_ENV" - echo "CLIENT_SECRET=${{ secrets.FIREBOLT_CLIENT_SECRET }}" >> "$GITHUB_ENV" + echo "CLIENT_ID=${{ secrets.SERVICE_ID }}" >> "$GITHUB_ENV" + echo "CLIENT_SECRET=${{ secrets.SERVICE_SECRET }}" >> "$GITHUB_ENV" fi - name: Setup database and engine diff --git a/.github/workflows/integration-tests-v2.yml b/.github/workflows/integration-tests-v2.yml index af965bc78f7..f2a8127b40c 100644 --- a/.github/workflows/integration-tests-v2.yml +++ b/.github/workflows/integration-tests-v2.yml @@ -16,10 +16,6 @@ on: default: 'staging' required: false type: string - branch: - required: false - type: string - description: 'Branch to run on' secrets: FIREBOLT_CLIENT_ID_STG_NEW_IDN: required: true @@ -35,8 +31,6 @@ jobs: steps: - name: Check out code uses: actions/checkout@v2 - with: - ref: ${{ inputs.branch }} - name: Set up Python 3.7 uses: actions/setup-python@v2 diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 3a8ee20fb09..d744acbdac1 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -16,10 +16,6 @@ on: default: 'staging' required: false type: string - branch: - required: false - type: string - description: 'Branch to run on' secrets: FIREBOLT_USERNAME: required: true @@ -33,6 +29,10 @@ on: required: true SERVICE_SECRET: required: true + SERVICE_ID_STG: + required: true + SERVICE_SECRET_STG: + required: true # V2 secrets FIREBOLT_CLIENT_ID_STG_NEW_IDN: required: true @@ -46,8 +46,7 @@ jobs: integration-test-v1: uses: ./.github/workflows/integration-tests-v1.yml with: - environment: ${{ github.event.inputs.environment }} - branch: ${{ github.event.inputs.branch }} + environment: ${{ inputs.environment }} secrets: FIREBOLT_USERNAME: ${{ secrets.FIREBOLT_USERNAME }} FIREBOLT_PASSWORD: ${{ secrets.FIREBOLT_PASSWORD }} @@ -55,11 +54,12 @@ jobs: FIREBOLT_STG_PASSWORD: ${{ secrets.FIREBOLT_STG_PASSWORD }} SERVICE_ID: ${{ secrets.SERVICE_ID }} SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }} + SERVICE_ID_STG: ${{ secrets.SERVICE_ID_STG }} + SERVICE_SECRET_STG: ${{ secrets.SERVICE_SECRET_STG }} integration-test-v2: uses: ./.github/workflows/integration-tests-v2.yml with: - environment: ${{ github.event.inputs.environment }} - branch: ${{ github.event.inputs.branch }} + environment: ${{ inputs.environment }} secrets: FIREBOLT_CLIENT_ID_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a5bae8458d..5178106fa99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,8 @@ on: jobs: integration-tests: uses: ./.github/workflows/integration-tests.yml + with: + environment: "staging" secrets: FIREBOLT_CLIENT_ID_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_ID_STG_NEW_IDN }} FIREBOLT_CLIENT_SECRET_STG_NEW_IDN: ${{ secrets.FIREBOLT_CLIENT_SECRET_STG_NEW_IDN }} @@ -24,6 +26,8 @@ jobs: FIREBOLT_STG_PASSWORD: ${{ secrets.FIREBOLT_STG_PASSWORD }} SERVICE_ID: ${{ secrets.SERVICE_ID }} SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }} + SERVICE_ID_STG: ${{ secrets.SERVICE_ID_STG }} + SERVICE_SECRET_STG: ${{ secrets.SERVICE_SECRET_STG }} publish: runs-on: ubuntu-latest