![]() |
||
---|---|---|
.github/workflows | ||
.gitignore | ||
Dockerfile | ||
LICENSE | ||
README.md | ||
action.yml | ||
entrypoint.sh |
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
- You should have a leading slash at the start of
target
- You should include filename/dirname into
target
. If you havesource=./directory
andtarget=/subdir/directory
, it would be nested -/subdir/directory/directory
Yandex Cloud
- For Ya.Cloud you have to include filename/dirname into
target
, otherwise you will get an emptytarget
. Example:source=directory; target=/test
leads to empty/test
, butsource=directory; target=/test/directory
would upload as expected.
Usage
- 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'
- 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
- 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