Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upload-s3 #35

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Setup environment

description: Setup environment

runs:
using: composite
steps:
Expand Down
35 changes: 35 additions & 0 deletions .github/actions/upload-s3/action.yml
Original file line number Diff line number Diff line change
@@ -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
Loading