Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
71d035e1e8 |
|
|
@ -3,8 +3,8 @@ LABEL authors="Vladimir <opa_oz> Levin"
|
|||
|
||||
RUN curl https://dl.min.io/client/mc/release/linux-amd64/mc \
|
||||
--create-dirs \
|
||||
-o /minio-binaries/mc
|
||||
RUN chmod +x /minio-binaries/mc
|
||||
-o $HOME/minio-binaries/mc
|
||||
RUN chmod +x $HOME/minio-binaries/mc
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
|
|
|||
18
README.md
18
README.md
|
|
@ -1,25 +1,13 @@
|
|||
# Yet another MinIO Upload GitHub Action
|
||||
|
||||
🥳Check also [Yet another MinIO Download GitHub Action](https://github.com/yakubique/minio-download)
|
||||
|
||||
Runs [minio client](https://min.io/docs/minio/linux/reference/minio-mc.html) 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
|
||||
```yaml
|
||||
- name: Upload to MinIO
|
||||
uses: yakubique/minio-upload@v1.1.3
|
||||
uses: yakubique/minio-upload@v1.1
|
||||
with:
|
||||
endpoint: ${{ secrets.MINIO_ENDPOINT }}
|
||||
access_key: ${{ secrets.MINIO_ACCESS_KEY }}
|
||||
|
|
@ -33,7 +21,7 @@ _Technically_ this action can be used with different S3-compatible services, but
|
|||
2. Upload a directory
|
||||
```yaml
|
||||
- name: Upload a directory to MinIO
|
||||
uses: yakubique/minio-upload@v1.1.3
|
||||
uses: yakubique/minio-upload@v1.1
|
||||
with:
|
||||
endpoint: ${{ secrets.MINIO_ENDPOINT }}
|
||||
access_key: ${{ secrets.MINIO_ACCESS_KEY }}
|
||||
|
|
@ -49,7 +37,7 @@ _Technically_ this action can be used with different S3-compatible services, but
|
|||
3. Upload to the insecure MinIO instance (_http-only_)
|
||||
```yaml
|
||||
- name: Upload to MinIO
|
||||
uses: yakubique/minio-upload@v1.1.3
|
||||
uses: yakubique/minio-upload@v1.1
|
||||
with:
|
||||
endpoint: ${{ secrets.MINIO_ENDPOINT }}
|
||||
access_key: ${{ secrets.MINIO_ACCESS_KEY }}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh -l
|
||||
|
||||
export PATH=$PATH:/minio-binaries/
|
||||
export PATH=$PATH:$HOME/minio-binaries/
|
||||
|
||||
insecure_option=""
|
||||
if [[ "$YA_INSECURE" == "true" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue