diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index beb21e5..ac657e5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -86,7 +86,7 @@ jobs: azcliversion: 2.58.0 inlineScript: | cd examples/with-${{ matrix.runtime }}/.nmt/dist && \ - func azure functionapp publish nmt-e2e-${{ matrix.target }}-${{ matrix.resource_identifier }} + func azure functionapp publish nmt-e2e-${{ matrix.target }}-${{ secrets[matrix.resource_identifier_key] }} - name: Wait for the deployment to finish run: sleep 60 @@ -94,5 +94,5 @@ jobs: - name: Run E2E tests run: pnpm exec nx run @infra/azure-functions:test env: - AZURE_FUNCTIONS_URL: https://nmt-e2e-${{ matrix.target }}-${{ matrix.resource_identifier }}.azurewebsites.net - AZURE_FUNCTIONS_API_KEY: ${{ secrets.AZURE_FUNCTIONS_HOST_KEY }} \ No newline at end of file + AZURE_FUNCTIONS_URL: https://nmt-e2e-${{ matrix.target }}-${{ secrets[matrix.resource_identifier_key] }}.azurewebsites.net + AZURE_FUNCTIONS_API_KEY: ${{ secrets.AZURE_FUNCTIONS_HOST_KEY }} diff --git a/infra/azure-functions/src/github-actions.ts b/infra/azure-functions/src/github-actions.ts index 374b3b4..0269276 100644 --- a/infra/azure-functions/src/github-actions.ts +++ b/infra/azure-functions/src/github-actions.ts @@ -20,9 +20,9 @@ export interface GithubActionsMatrix { */ target: string; /** - * Resource Identifier + * Resource Identifier Key for getting value from github actions secrets */ - resource_identifier: string; + resource_identifier_key: string; } /** @@ -51,7 +51,7 @@ export function toGithubActionsMatrix(configs: InfraEnvConfig[]): GithubActionsM runtime: runtime === 'bun' ? 'bun' : 'node', version, target: toTarget(config), - resource_identifier: config.resourceIdentifier, + resource_identifier_key: `RESOURCE_IDENTIFIER_${toTarget(config).replaceAll('-', '_').toUpperCase()}`, } satisfies GithubActionsMatrix; }); }