GitHub Action to upload files to MinIO
Go to file
Vladimir Levin 44c9f09e70 Tricks section 2023-08-06 20:56:46 +09:00
.github/workflows Stable 2023-08-06 19:39:17 +09:00
.gitignore Upload to MinIO action 2023-08-06 16:59:43 +09:00
Dockerfile Small revamp 2023-08-06 20:39:49 +09:00
LICENSE Initial commit 2023-08-06 16:18:51 +09:00
README.md Tricks section 2023-08-06 20:56:46 +09:00
action.yml Update info 2023-08-06 17:14:13 +09:00
entrypoint.sh Small revamp 2023-08-06 20:39:49 +09:00

README.md

Yet another MinIO Upload GitHub Action

🥳Check also Yet another MinIO Download GitHub Action

Runs minio client to upload file(s) to MinIO (self-hosted as well)

Tricky part

Technically this action can be used with different S3-compatible services, but it needs tuning

MinIO

  1. You should have a leading slash at the start of target
  2. You should include filename/dirname into target. If you have source=./directory and target=/subdir/directory, it would be nested - /subdir/directory/directory

Yandex Cloud

  1. For Ya.Cloud you have to include filename/dirname into target, otherwise you will get an empty target. Example: source=directory; target=/test leads to empty /test, but source=directory; target=/test/directory would upload as expected.

Usage

  1. Upload a file
- name: Upload to MinIO
  uses: yakubique/minio-upload@v1.1.3
  with:
    endpoint: ${{ secrets.MINIO_ENDPOINT }}
    access_key: ${{ secrets.MINIO_ACCESS_KEY }}
    secret_key: ${{ secrets.MINIO_SECRET_KEY }}
    bucket: my_bucket_name
    source: ./my-build-1-1-0.tar.gz
    # Leading slash is required
    target: '/builds'
  1. Upload a directory
- name: Upload a directory to MinIO
  uses: yakubique/minio-upload@v1.1.3
  with:
    endpoint: ${{ secrets.MINIO_ENDPOINT }}
    access_key: ${{ secrets.MINIO_ACCESS_KEY }}
    secret_key: ${{ secrets.MINIO_SECRET_KEY }}
    bucket: my_bucket_name
    source: ./public
    # Leading slash is required
    target: '/my-awesome-site'
    # If you omit the `recursive` argument, action only copies objects in the top level of the specified directory.
    recursive: true
  1. Upload to the insecure MinIO instance (http-only)
- name: Upload to MinIO
  uses: yakubique/minio-upload@v1.1.3
  with:
    endpoint: ${{ secrets.MINIO_ENDPOINT }}
    access_key: ${{ secrets.MINIO_ACCESS_KEY }}
    secret_key: ${{ secrets.MINIO_SECRET_KEY }}
    bucket: my_bucket_name
    source: ./access-log.1970.01.01.tar.gz
    # Leading slash is required
    target: '/logs'
    # Disables TLS/SSL certificate verification. Allows TLS connectivity to servers with invalid certificates.
    insecure: true