https://github.com/zdurham/s3-upload-github-action
Upload github action for sending files to s3
https://github.com/zdurham/s3-upload-github-action
Last synced: about 1 year ago
JSON representation
Upload github action for sending files to s3
- Host: GitHub
- URL: https://github.com/zdurham/s3-upload-github-action
- Owner: zdurham
- License: mit
- Created: 2020-03-23T17:45:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-17T19:24:42.000Z (almost 3 years ago)
- Last Synced: 2025-04-05T17:36:45.817Z (about 1 year ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 21
- Watchers: 1
- Forks: 46
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# s3-upload-github-action
Upload github action for sending files to s3
## Usage
This is a super straightforward action that uses the aws cli tool to copy a particular file to an s3 bucket. The file can come from your code directly or generated by an earlier part of your github actions flow. Check out the example below to get started.
Please note that each env var is required. It is recommended to put your AWS credentials in as repository secrets, as well as your bucket name.
```yaml
# inside .github/workflows/your-action.yml
name: Add File to Bucket
on: push
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Upload file to bucket
uses: zdurham/s3-upload-github-action@master
with:
args: --acl public-read
env:
FILE: ./lambda.zip
AWS_REGION: 'us-east-1'
S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
S3_KEY: ${{ secrets.S3_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
```