Skip to content

mc-actions/configure

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

MinIO CLI Configure Action

Downloads binary and configures it for using with your favourite s3 server.

After configuring you can use mc command line tool or other actions from mc-actions.

List of available commands you can find in official mc command line tool documentation

Examples

Simply configure mc to use with MinIO server on https://minio.company. Use GitHub secrets to provide Access and Secret keys for job.

steps:
- uses: mc-actions/configure@v1
  with:
    s3_server: 'https://minio.company'
    s3_access_key: '${{ secrets.S3_ACCESS_KEY }}'
    s3_secret_key: '${{ secrets.S3_SECRET_KEY }}'
- shell: bash
  run: |
    mc ls default  # This line will return list of buckets in https://minio.company

Google Storage configuration

Create credentials with google manual. Save Access and Secret keys to GitHub secrets S3_ACCESS_KEY and S3_SECRET_KEY respectively.

steps:
- uses: mc-actions/configure@v1
  with:
    s3_server: 'https://storage.googleapis.com'
    s3_access_key: '${{ secrets.S3_ACCESS_KEY }}'
    s3_secret_key: '${{ secrets.S3_SECRET_KEY }}'
    s3_api: 'S3v2'
    path: 'dns'
- shell: bash
  run: |
    mc ls default  # This line will return list of buckets in Google Storage

AWS S3 configuration

Get credentials for AWS S3

  • Open the IAM console.
  • From the navigation menu, click Users.
  • Select your IAM user name.
  • Click User Actions, and then click Manage Access Keys.
  • Click Create Access Key.
  • Setup Access key ID and Secret access key to GitHub secrets S3_ACCESS_KEY and S3_SECRET_KEY respectively.
steps:
- uses: mc-actions/configure@v1
  with:
    s3_server: 'https://s3.amazonaws.com'
    s3_access_key: '${{ secrets.S3_ACCESS_KEY }}'
    s3_secret_key: '${{ secrets.S3_SECRET_KEY }}'
    path: 'dns'
- shell: bash
  run: |
    mc ls default  # This line will return list of buckets in AWS S3

Yandex Object Storage configuration

Get keys according to this manual and set Key ID and Secret key to GitHub secrets S3_ACCESS_KEY and S3_SECRET_KEY respectively.

steps:
- uses: mc-actions/configure@v1
  with:
    s3_server: 'https://storage.yandexcloud.net'
    s3_access_key: '${{ secrets.S3_ACCESS_KEY }}'
    s3_secret_key: '${{ secrets.S3_SECRET_KEY }}'
- shell: bash
  run: |
    mc ls default  # This line will return list of buckets in Yandex Object Storage

Action inputs

The following action inputs are available to configure mc:

Name description Example
server_alias Any string
Optional, default default

Name of server to use in CLI. Do not edit if you will use other mc-actions.
play
s3_server scheme://host[:port]/ string
Required

Scheme and hostname of s3 server
https://play.min.io
s3_access_key Any string
Required

Access key, Access key ID, Key ID, etc. Use GitHub Secrets!
Q3AM3UQ867SPQQA43P2F
s3_secret_key Any string
Required

Secret access key, Secret key, etc. Use GitHub Secrets!
zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
s3_api s3v4, s3v2
Optional, default S3v4

S3 API version to use
S3v4
path auto, on, off, dns
Optional, default auto

Bucket path lookup supported by the server
auto