Skip to content

Commit d86788d

Browse files
committed
fix(deploy-to-aws): mirror legacy-api-key plumbing from the -uv variant
The non-uv `deploy-to-aws.yml` had the same Smoke Test step shape as `deploy-to-aws-uv.yml` but was missing the legacy-api-key fallback that was added to the uv variant in the previous commit. Adding it here for parity — consumers using the non-uv workflow with a stack that has moved past `apiGateway.apiKeys` will otherwise hit the same "Could not find key" failure.
1 parent a619907 commit d86788d

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/deploy-to-aws.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,16 @@ jobs:
185185
expected-regex: ${{ inputs.smoketest-expected }}
186186
working-directory: ${{ inputs.working-directory}}
187187
url: ${{ (github.ref == 'refs/heads/main') && inputs.smoketest-url-prod || inputs.smoketest-url-test }}
188+
# Fallback x-api-key for stacks that have moved past `apiGateway.apiKeys`
189+
# to a Lambda authorizer (so no TempApiKey-* line in deploy.out).
190+
# Picks up any of the standard GNS-Science API-key secrets inherited via
191+
# `secrets: inherit`. Each consumer's serverless.yml wires its own
192+
# named secret into the Lambda authorizer's LEGACY_API_KEY env var.
193+
legacy-api-key: >-
194+
${{ secrets.LEGACY_API_KEY
195+
|| secrets.NZSHM22_TOSHI_API_KEY
196+
|| secrets.NZSHM22_KORORAA_API_KEY
197+
|| secrets.NZSHM22_NSHM_MODEL_API_KEY
198+
|| secrets.NZSHM22_SOLVIS_API_KEY
199+
|| secrets.NZSHM22_HAZARD_API_KEY
200+
|| '' }}

0 commit comments

Comments
 (0)