Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
award

GitHub Action

Use S3cmd

v1.1

Use S3cmd

award

Use S3cmd

Use S3cmd cli to interact with s3 object storage

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Use S3cmd

uses: s3-actions/s3cmd@v1.1

Learn more about this action in s3-actions/s3cmd

Choose a version

S3cmd

This action is a simple wrapper for S3cmd.

Currently AWS and Linode are supported as provider but it could be used with other providers too when using additional flags.

Inputs

provider

Not Required The s3 provider to use. Defaults to Linode. Currently AWS and Linode possible.

secret_key

Required The buckets secret key.

access_key

Required The buckets access key.

region

Not Required The default region to use.

Example usage

- name: Set up S3cmd cli tool
  uses: s3-actions/s3cmd@v1.1
  with:
    provider: aws # default is linode
    region: 'eu-central-1'
    access_key: ${{ secrets.S3_ACCESS_KEY }}
    secret_key: ${{ secrets.S3_SECRET_KEY }}

- name: Interact with object storage
  run: |
    s3cmd sync --recursive --acl-public dist s3://awesome.blog
    s3cmd info s3://awesome.blog

Note

The region only matters when creating a new bucket with mb. In that case a different region apart from the default region can be provided ad hoc.

s3cmd mb --region ap-south-1 s:·//my-bucket

For linode object storage this wont work though. The region must always be set to US. If you want to change the region on the fly you can still do ith with the below command.

s3cmd mb --host ap-south-1.linodeobjects.com  s3://my-bucket