Skip to content

Commit

Permalink
chore: support different access keys for dev and prod accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
mmanciop committed Oct 19, 2023
1 parent 320de27 commit f730efc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ jobs:
shell: bash
working-directory: packages/otelbin-validation
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'eu-central-1'
AWS_ACCESS_KEY_ID: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ACCESS_KEY_ID_PROD || secrets.AWS_ACCESS_KEY_ID_DEV }}
AWS_SECRET_ACCESS_KEY: ${{ github.ref == 'refs/heads/main' && secrets.AWS_SECRET_ACCESS_KEY_PROD || secrets.AWS_SECRET_ACCESS_KEY_DEV }}
AWS_DEFAULT_REGION: 'us-east-2'
CDK_DEPLOY_ACCOUNT: ${{ github.ref == 'refs/heads/main' && '462608073829' || '622203989445' }}
CDK_DEPLOY_REGION: 'eu-central-1'
CDK_DEPLOY_REGION: 'us-east-2'
GH_TOKEN: ${{ github.token }}
TEST_ENVIRONMENT_NAME: ${{ steps.get_test_env_name.outputs.test_env_name }}
run: |
Expand Down Expand Up @@ -149,9 +149,9 @@ jobs:
shell: bash
working-directory: packages/otelbin-validation
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'eu-central-1'
AWS_ACCESS_KEY_ID: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ACCESS_KEY_ID_PROD || secrets.AWS_ACCESS_KEY_ID_DEV }}
AWS_SECRET_ACCESS_KEY: ${{ github.ref == 'refs/heads/main' && secrets.AWS_SECRET_ACCESS_KEY_PROD || secrets.AWS_SECRET_ACCESS_KEY_DEV }}
AWS_DEFAULT_REGION: 'us-east-2'
API_GATEWAY_NAME: ${{ needs.prep-itests.outputs.validation_api_apigateway_name }}
API_GATEWAY_URL: ${{ needs.prep-itests.outputs.validation_api_apigateway_url }}
RELEASE_UNDER_TEST: ${{ matrix.test_matrix }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/clean-up-test-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
shell: bash
working-directory: packages/otelbin-validation
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'eu-central-1'
AWS_ACCESS_KEY_ID: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ACCESS_KEY_ID_PROD || secrets.AWS_ACCESS_KEY_ID_DEV }}
AWS_SECRET_ACCESS_KEY: ${{ github.ref == 'refs/heads/main' && secrets.AWS_SECRET_ACCESS_KEY_PROD || secrets.AWS_SECRET_ACCESS_KEY_DEV }}
AWS_DEFAULT_REGION: 'us-east-2'
CDK_DEPLOY_ACCOUNT: ${{ github.ref == 'refs/heads/main' && '462608073829' || '622203989445' }}
CDK_DEPLOY_REGION: 'eu-central-1'
CDK_DEPLOY_REGION: 'us-east-2'
GH_TOKEN: ${{ github.token }}
TEST_ENVIRONMENT_NAME: ${{ steps.get_test_env_name.outputs.test_env_name }}
run: |
Expand Down

0 comments on commit f730efc

Please sign in to comment.