Skip to content

Commit

Permalink
Initial aws-configure action
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Kim committed Apr 21, 2021
1 parent 4c91b0f commit c545ca8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions aws-configure/action.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c545ca8

Please # to comment.