Skip to content

Commit c545ca8

Browse files
committed
Initial aws-configure action
1 parent 4c91b0f commit c545ca8

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

aws-configure/action.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: AWS Configure
2+
description: Configures a profile for the AWS CLI
3+
4+
inputs:
5+
aws_access_key_id:
6+
required: true
7+
aws_secret_access_key:
8+
required: true
9+
aws_region:
10+
required: true
11+
aws_profile:
12+
required: true
13+
14+
runs:
15+
using: "composite"
16+
steps:
17+
- name: Configure AWS credentials
18+
run: |
19+
echo "Configuring AWS profile '${{ inputs.aws_profile }}'"
20+
aws configure set 'profile.${{ inputs.aws_profile }}.aws_access_key_id' '${{ inputs.aws_access_key_id }}'
21+
aws configure set 'profile.${{ inputs.aws_profile }}.aws_secret_access_key' '${{ inputs.aws_secret_access_key }}'
22+
aws configure set 'profile.${{ inputs.aws_profile }}.region' '${{ inputs.aws_region }}'
23+
aws configure set 'profile.${{ inputs.aws_profile }}.output' json
24+
echo 'AWS_PROFILE=${{ inputs.aws_profile }}' >> $GITHUB_ENV
25+
shell: bash

0 commit comments

Comments
 (0)