Skip to content

Commit d8b3a5d

Browse files
committed
Add an optional insecure option for minio
1 parent 3ef78dd commit d8b3a5d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,18 @@ inputs:
2222
description: 'Set a target directory for deployment (with a leading slash).'
2323
required: false
2424
default: '/'
25+
insecure:
26+
description: 'Trust SSL certificates with minio --insecure option'
27+
required: false
28+
default: 'false'
2529
runs:
2630
using: 'docker'
2731
image: 'Dockerfile'
2832
env:
2933
MINIO_ENDPOINT: ${{ inputs.endpoint }}
3034
MINIO_ACCESS_KEY: ${{ inputs.access_key }}
3135
MINIO_SECRET_KEY: ${{ inputs.secret_key }}
36+
MINIO_INSECURE: ${{ inputs.insecure }}
3237
args:
3338
- ${{ inputs.source_dir }}
3439
- '${{ inputs.bucket }}${{ inputs.target_dir }}'

entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ set -euxo pipefail
44

55
mc alias set deploy $MINIO_ENDPOINT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
66

7-
mc mirror --overwrite $1 "deploy/$2"
7+
insecure_option=""
8+
if ["$MINIO_INSECURE" == "true"]; then
9+
insecure_option="--insecure"
10+
fi
11+
12+
mc mirror --overwrite $insecure_option $1 "deploy/$2"

0 commit comments

Comments
 (0)