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: qoqa/action-s3-cp@v1.1
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'
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 |
This project is distributed under the MIT license.