Skip to content

Commit

Permalink
Set AWS credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
hellais committed Mar 13, 2024
1 parent a0a68b1 commit cfbb680
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/check_terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ jobs:
- uses: actions/checkout@v4

- name: Configure AWS credentials
env:
AWS_ACCESS_KEY_ID: ${{ secrets.OONIDEVOPS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.OONIDEVOPS_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-central-1
run: |
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY
aws configure set default.region $AWS_DEFAULT_REGION
# Create profile oonidevops_user
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile oonidevops_user
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile oonidevops_user
aws configure set default.region $AWS_DEFAULT_REGION --profile oonidevops_user
mkdir ~/.aws/
cat <<EOF > ~/.aws/credentials
[default]
aws_access_key_id = ${{ secrets.OONIDEVOPS_AWS_ACCESS_KEY_ID }}
aws_secret_access_key = ${{ secrets.OONIDEVOPS_AWS_SECRET_ACCESS_KEY }}
[oonidevops_user]
aws_access_key_id = ${{ secrets.OONIDEVOPS_AWS_ACCESS_KEY_ID }}
aws_secret_access_key = ${{ secrets.OONIDEVOPS_AWS_SECRET_ACCESS_KEY }}
EOF
chmod 700 ~/.aws/
chmod 600 ~/.aws/credentials
- name: Install Terraform
run: |
Expand Down

0 comments on commit cfbb680

Please sign in to comment.