From 8fc92ad71ce900426afd3d6a61e1a605a9aed6f4 Mon Sep 17 00:00:00 2001 From: Malcolm Rebughini <9681621+malcolmrebughini@users.noreply.github.com> Date: Tue, 29 Oct 2024 14:37:22 -0700 Subject: [PATCH] fix: get secrets on generate --- .github/workflows/retrieve_secrets.yaml | 5 +---- .github/workflows/sdk_generation.yaml | 13 +++++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/retrieve_secrets.yaml b/.github/workflows/retrieve_secrets.yaml index c786eac..dce86e9 100644 --- a/.github/workflows/retrieve_secrets.yaml +++ b/.github/workflows/retrieve_secrets.yaml @@ -1,12 +1,10 @@ name: Retrieve Secrets - on: workflow_call: inputs: environment: required: true type: string - jobs: retrieve-secrets: runs-on: ubuntu-latest @@ -17,12 +15,11 @@ jobs: environment: ${{ inputs.environment }} oidc-name: shippo-php-sdk-pipeline login-to-ecr: false - - name: Get Speakeasy Secrets Manager id: get-secrets uses: aws-actions/aws-secretsmanager-get-secrets@v2 with: secret-ids: | - dev-main-speakeasy-api-key + ,dev-main-speakeasy-api-key name-transformation: uppercase parse-json-secrets: true diff --git a/.github/workflows/sdk_generation.yaml b/.github/workflows/sdk_generation.yaml index 52cfae6..e12281b 100644 --- a/.github/workflows/sdk_generation.yaml +++ b/.github/workflows/sdk_generation.yaml @@ -5,7 +5,6 @@ permissions: pull-requests: write statuses: write id-token: write - on: workflow_dispatch: inputs: @@ -15,17 +14,15 @@ on: default: false schedule: - cron: 0 0 * * * - jobs: - gather-secrets: - uses: ./.github/workflows/secrets_retrieval.yaml - with: - environment: dev-main - speakeasy_generate: needs: gather-secrets runs-on: ubuntu-latest steps: + - name: Get secrets + uses: ./.github/workflows/secrets_retrieval.yaml + with: + environment: dev-main - name: Generate SDK uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15 with: @@ -34,4 +31,4 @@ jobs: speakeasy_version: latest env: github_access_token: ${{ secrets.GITHUB_TOKEN }} - speakeasy_api_key: ${{ jobs.gather-secrets.outputs.get-secrets.DEV_MAIN_SPEAKEASY_API_KEY_PHP_API_KEY }} # Reference the output directly + speakeasy_api_key: ${{ jobs.gather-secrets.outputs.get-secrets.DEV_MAIN_SPEAKEASY_API_KEY_PHP_API_KEY }} # Reference the output directly