Skip to content

Commit

Permalink
fix: reference of access keys between CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmanciop committed Nov 8, 2023
1 parent d86656c commit 3b23cdc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
validation_api_apigateway_name: ${{ steps.parse_cdk_output.outputs.api_gateway_name }}
validation_api_apigateway_url: ${{ steps.parse_cdk_output.outputs.api_gateway_url }}\
validation_api_apigateway_key_id: ${{ steps.parse_cdk_output.outputs.api_gateway_key_id }}
test_env_name: ${{ steps.get_test_env_name.outputs.test_env_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -159,6 +160,20 @@ jobs:
run: |
npm ci
- name: Select credentials
id: select_credentials
shell: bash
env:
TEST_ENVIRONMENT_NAME: ${{ needs.prep-itests.outputs.test_env_name }}
run: |
if [ "${TEST_ENVIRONMENT_NAME}" == 'main' ]; then
echo 'aws_access_key=${{secrets.AWS_ACCESS_KEY_ID_PROD}}' >> ${GITHUB_OUTPUT}
echo 'aws_secret_access_key=${{secrets.AWS_SECRET_ACCESS_KEY_PROD}}' >> ${GITHUB_OUTPUT}
else
echo 'aws_access_key=${{secrets.AWS_ACCESS_KEY_ID_DEV}}' >> ${GITHUB_OUTPUT}
echo 'aws_secret_access_key=${{secrets.AWS_SECRET_ACCESS_KEY_DEV}}' >> ${GITHUB_OUTPUT}
fi
- name: Retrieve API Key for Validation API and run tests
shell: bash
working-directory: packages/otelbin-validation
Expand Down

0 comments on commit 3b23cdc

Please sign in to comment.