Skip to content

Commit

Permalink
fix: get secrets on generate
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmrebughini committed Oct 29, 2024
1 parent 8d3c970 commit 8fc92ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/retrieve_secrets.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: Retrieve Secrets

on:
workflow_call:
inputs:
environment:
required: true
type: string

jobs:
retrieve-secrets:
runs-on: ubuntu-latest
Expand All @@ -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
13 changes: 5 additions & 8 deletions .github/workflows/sdk_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ permissions:
pull-requests: write
statuses: write
id-token: write

on:
workflow_dispatch:
inputs:
Expand All @@ -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:
Expand All @@ -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

0 comments on commit 8fc92ad

Please sign in to comment.