CyberTianzun / simple-s3-upload-action

github action for upload to S3 ☁️

Home Page:https://github.com/marketplace/actions/upload-s3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple S3 Upload

This action upload directory to AWS S3 by public read with custom destination directory

Usage

workflow.yml Example

Place in a .yml file such as this one in your .github/workflows folder. Refer to the documentation on workflow YAML syntax here.

name: Upload to S3

on: [pull_request]

jobs:
  upload:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: cnzx219/simple-s3-upload-action@master
        with:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
          AWS_S3_REGION: ${{ secrets.AWS_S3_REGION }}
          AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
          SOURCE_DIR: '<directory name>'
          DEST_DIR: '<destination directory name to your S3 bucket>'

Action inputs

The following settings must be passed as environment variables as shown in the example. Sensitive information, especially AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, should be set as encrypted secrets — otherwise, they'll be public to anyone browsing your repository's source code

name description
AWS_ACCESS_KEY_ID (Required) Your AWS Access Key. More info here.
AWS_SECRET_ACCESS_KEY (Required) Your AWS Secret Access Key. More info here.
AWS_S3_REGION (Required) The region of the bucket you're upload to.
AWS_S3_BUCKET (Required) The name of the bucket you're upload to.
SOURCE_DIR (Required) The local directory you wish to upload to S3.
DEST_DIR (Required) The output directory you with to be uploaded in your S3 bucket.

Action outputs

name description
object_locations S3 Object Locations

About

github action for upload to S3 ☁️

https://github.com/marketplace/actions/upload-s3


Languages

Language:JavaScript 100.0%