Skip to content

adRise/s3-cp-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Action to S3 cp

Borrowed most of it from jakejarvis/s3-sync-action.

Usage

To copy a file

name: Download a file from S3

on:
  push:
    branches:
    - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    
    - name: Copy a file from s3
      uses: prewk/s3-cp-action@v2
      with:
        aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        source: 's3://some-bucket/something-remote'
        dest: './something-local'

To copy a folder

name: Upload a folder to S3

on:
  push:
    branches:
    - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    
    - name: Copy a folder to s3
      uses: prewk/s3-cp-action@v2
      with:
        aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
        aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        source: './something-local'
        dest: 's3://some-bucket/something-remote'
        flags: --recursive

Configuration

Key Value Suggested Type Required Default
aws_access_key_id Your AWS Access Key. More info here. secret env Yes N/A
aws_secret_access_key Your AWS Secret Access Key. More info here. secret env Yes N/A
source The local file (or s3 key) you wish to cp. env Yes N/A
dest The s3 key (or local file) you wish the file to be copied to. env Yes N/A
aws_region The region where you created your bucket. Set to us-east-1 by default. Full list of regions here. env No us-east-1
aws_s3_endpoint The endpoint URL of the bucket you are coping to. Can be used for VPC scenarios or for non-AWS services using the S3 API, like DigitalOcean Spaces. env No Automatic (s3.amazonaws.com or AWS's region-specific equivalent)
flags The flags that you want to add env No N/A

Packages

No packages published

Languages

  • Shell 65.7%
  • Dockerfile 34.3%