diff --git a/.github/actions/setup-environment/action.yml b/.github/actions/setup-environment/action.yml index 9f873ab..7481c8c 100644 --- a/.github/actions/setup-environment/action.yml +++ b/.github/actions/setup-environment/action.yml @@ -1,5 +1,7 @@ name: Setup environment + description: Setup environment + runs: using: composite steps: diff --git a/.github/actions/upload-s3/action.yml b/.github/actions/upload-s3/action.yml new file mode 100644 index 0000000..7a42706 --- /dev/null +++ b/.github/actions/upload-s3/action.yml @@ -0,0 +1,35 @@ +name: Upload S3 + +description: Upload S3 + +inputs: + aws-region: + required: true + type: string + role-to-assume: + required: true + type: string + s3-bucket: + required: true + type: string + path: + required: true + type: string + +runs: + using: composite + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: ${{ inputs.aws-region }} + role-to-assume: ${{ inputs.role-to-assume }} + + - name: Upload to S3 + run: | + if [ -d ${{ inputs.path }} ]; then + aws s3 cp ${{ inputs.path }} s3://${{ inputs.s3-bucket }} --recursive + else + aws s3 cp ${{ inputs.path }} s3://${{ inputs.s3-bucket }} + fi + shell: bash