Giter VIP home page Giter VIP logo

action-s3-cp's Introduction

GitHub Action to aws s3 cp a file to an S3 Bucket ๐Ÿ”„

This simple action uses the vanilla AWS CLI to cp a file (either from your repository or generated during your workflow) to a remote S3 bucket.

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 CHANGELOG to S3

on:
  push:
    branches:
      - master

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: qoqa/[email protected]
        env:
          AWS_S3_BUCKET: ${{ secrets.CHANGELOG_AWS_S3_BUCKET }}
          AWS_ACCESS_KEY_ID: ${{ secrets.CHANGELOG_AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.CHANGELOG_AWS_SECRET_ACCESS_KEY }}
          AWS_REGION: 'eu-west-1'
          AWS_S3_PATH: '/changelogs/CHANGELOG.android.md'
          FILE: 'CHANGELOG.md'

Required Environment Variables

Key Value Type Required
FILE The local file you wish to upload to S3. For example, ./myfile.txt. env Yes
AWS_S3_PATH The remote file on S3. For example, /path/myfile.txt. env Yes
AWS_REGION The region where you created your bucket in. For example, eu-central-1. Full list of regions here. env Yes
AWS_S3_BUCKET The name of the bucket you're cp to. For example, golang-deployment-bucket. env Yes
AWS_ACCESS_KEY_ID Your AWS Access Key. More info here. env Yes
AWS_SECRET_ACCESS_KEY Your AWS Secret Access Key. More info here. env Yes

License

This project is distributed under the MIT license.

action-s3-cp's People

Contributors

kevinrob 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.