Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
98438a5d45 | |
![]() |
3828a9a333 | |
![]() |
5e89769152 | |
![]() |
24adab1e89 | |
![]() |
d8b3a5dadb | |
![]() |
3ef78dd641 |
|
@ -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: '/'
|
||||||
|
insecure:
|
||||||
|
description: 'Trust SSL certificates with minio --insecure option'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
@ -29,6 +33,7 @@ runs:
|
||||||
MINIO_ENDPOINT: ${{ inputs.endpoint }}
|
MINIO_ENDPOINT: ${{ inputs.endpoint }}
|
||||||
MINIO_ACCESS_KEY: ${{ inputs.access_key }}
|
MINIO_ACCESS_KEY: ${{ inputs.access_key }}
|
||||||
MINIO_SECRET_KEY: ${{ inputs.secret_key }}
|
MINIO_SECRET_KEY: ${{ inputs.secret_key }}
|
||||||
|
MINIO_INSECURE: ${{ inputs.insecure }}
|
||||||
args:
|
args:
|
||||||
- ${{ inputs.source_dir }}
|
- ${{ inputs.source_dir }}
|
||||||
- '${{ inputs.bucket }}${{ inputs.target_dir }}'
|
- '${{ inputs.bucket }}${{ inputs.target_dir }}'
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
mc alias set deploy $MINIO_ENDPOINT $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
|
set -euxo pipefail
|
||||||
|
|
||||||
mc mirror --overwrite $1 "deploy/$2"
|
insecure_option=""
|
||||||
|
if [[ "$MINIO_INSECURE" == "true" ]]; then
|
||||||
|
insecure_option="--insecure"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mc alias set ${insecure_option:+"$insecure_option"} deploy "$MINIO_ENDPOINT" "$MINIO_ACCESS_KEY" "$MINIO_SECRET_KEY"
|
||||||
|
|
||||||
|
mc mirror --overwrite ${insecure_option:+"$insecure_option"} $1 "deploy/$2"
|
||||||
|
|
Loading…
Reference in New Issue