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.
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: papac/action-s3-cp@v0.2
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-1'
SOURCE: 'CHANGELOG.md'
DESTINATION: '/path/changelogs/CHANGELOG.android.md'
Key | Value | Type | Required |
---|---|---|---|
FROM |
Define the orientation of action between upload or download. If is set local we copy file from local to s3 and if is set s3 we download file from s3 to local. The default value is s3 |
env |
NO |
SOURCE |
The local or remote. | env |
Yes |
DESTINATION |
The local or remote. | 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 |
This project is distributed under the MIT license.