Code Monkey home page Code Monkey logo

s3-cp-action's Introduction

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

s3-cp-action's People

Contributors

prewk avatar theovincent avatar

Watchers

Jacek Zienkiewicz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.