From c545ca8aecf8e6a2a70b148e3ad1a3401487135a Mon Sep 17 00:00:00 2001 From: Christopher Kim Date: Tue, 20 Apr 2021 17:52:24 -0700 Subject: [PATCH] Initial aws-configure action --- aws-configure/action.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 aws-configure/action.yml diff --git a/aws-configure/action.yml b/aws-configure/action.yml new file mode 100644 index 0000000..9035f83 --- /dev/null +++ b/aws-configure/action.yml @@ -0,0 +1,25 @@ +name: AWS Configure +description: Configures a profile for the AWS CLI + +inputs: + aws_access_key_id: + required: true + aws_secret_access_key: + required: true + aws_region: + required: true + aws_profile: + required: true + +runs: + using: "composite" + steps: + - name: Configure AWS credentials + run: | + echo "Configuring AWS profile '${{ inputs.aws_profile }}'" + aws configure set 'profile.${{ inputs.aws_profile }}.aws_access_key_id' '${{ inputs.aws_access_key_id }}' + aws configure set 'profile.${{ inputs.aws_profile }}.aws_secret_access_key' '${{ inputs.aws_secret_access_key }}' + aws configure set 'profile.${{ inputs.aws_profile }}.region' '${{ inputs.aws_region }}' + aws configure set 'profile.${{ inputs.aws_profile }}.output' json + echo 'AWS_PROFILE=${{ inputs.aws_profile }}' >> $GITHUB_ENV + shell: bash