feat: add possibility to pass options

This commit is contained in:
2025-08-10 15:48:25 +02:00
parent 8bbc4deb87
commit cb42fca364
2 changed files with 7 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
name: "Minio upload" name: "Minio upload"
description: "Deploy to Minio Storage" description: "Mirror to Minio Storage"
author: "sPazz" author: "sPazz"
inputs: inputs:
endpoint: endpoint:
@@ -22,6 +22,10 @@ inputs:
description: "Set a target directory for deployment (with a leading slash)." description: "Set a target directory for deployment (with a leading slash)."
required: false required: false
default: "/" default: "/"
options:
description: "Options to pass to mirror mc command"
required: false
default: ""
runs: runs:
using: "docker" using: "docker"
image: "Dockerfile" image: "Dockerfile"
@@ -32,6 +36,7 @@ runs:
args: args:
- ${{ inputs.source_dir }} - ${{ inputs.source_dir }}
- "${{ inputs.bucket }}${{ inputs.target_dir }}" - "${{ inputs.bucket }}${{ inputs.target_dir }}"
- "${{ inputs.options }}"
branding: branding:
icon: "upload-cloud" icon: "upload-cloud"
color: "black" color: "black"

View File

@@ -3,4 +3,4 @@ set -euo pipefail
mc alias set deploy $MINIO_ENDPOINT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY --api S3v4 mc alias set deploy $MINIO_ENDPOINT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY --api S3v4
mc mirror --overwrite $1 "deploy/$2" mc mirror --overwrite $3 $1 "deploy/$2"