Skip to content

Commit

Permalink
Last try
Browse files Browse the repository at this point in the history
  • Loading branch information
MariusB-DevOps committed Dec 9, 2024
1 parent 719acef commit a377018
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/terraform-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,29 @@ jobs:

- name: Read User Mapping
id: user-mapping
run: |
user_mapping=$(cat user-mapping.json)
github_actor=${{ github.actor }}
run: |
user_mapping=$(cat user-mapping.json)
github_actor=${{ github.actor }}
echo "User mapping: $user_mapping"
echo "GitHub actor: $github_actor"
echo "User mapping: $user_mapping"
echo "GitHub actor: $github_actor"
user_data=$(echo "$user_mapping" | jq -r ".$github_actor")
user_data=$(echo "$user_mapping" | jq -r ".$github_actor")
if [[ -z "$user_data" ]]; then
echo "No user mapping found for $github_actor"
exit 1
fi
if [[ -z "$user_data" ]]; then
echo "No user mapping found for $github_actor"
exit 1
fi
access_key_id=$(echo $user_data | jq -r '.AWS_SECRET_ACCESS_KEY_ID')
secret_access_key=$(echo $user_data | jq -r '.AWS_SECRET_ACCESS_KEY')
access_key_id=$(echo $user_data | jq -r '.AWS_SECRET_ACCESS_KEY_ID')
secret_access_key=$(echo $user_data | jq -r '.AWS_SECRET_ACCESS_KEY')
echo "Access key ID: $access_key_id"
echo "Secret access key: $secret_access_key"
echo "Access key ID: $access_key_id"
echo "Secret access key: $secret_access_key"
echo "::set-output name=access_key_id::${access_key_id}"
echo "::set-output name=secret_access_key::${secret_access_key}"
echo "::set-output name=access_key_id::${access_key_id}"
echo "::set-output name=secret_access_key::${secret_access_key}"
- name: Print User Mapping
run: echo "${{ steps.user-mapping.outputs.user-mapping }}"

Expand Down

0 comments on commit a377018

Please sign in to comment.