Added MinIO
This commit is contained in:
25
minio/mc/entrypoint.sh
Normal file
25
minio/mc/entrypoint.sh
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
ARGS="$@"
|
||||
|
||||
MC_CONFIG_DIR="/root/.mc"
|
||||
mkdir -p "$MC_CONFIG_DIR"
|
||||
|
||||
mc --config-dir "$MC_CONFIG_DIR" alias set "$S3_ALIAS" "$S3_URL" "$S3_ACCESS_KEY_ID" "$S3_SECRET_ACCESS_KEY"
|
||||
|
||||
OUTPUT=$(bash -c "mc --config-dir $MC_CONFIG_DIR $ARGS")
|
||||
RESULT=$?
|
||||
echo "$OUTPUT"
|
||||
|
||||
#Output multiline strings.
|
||||
#https://trstringer.com/github-actions-multiline-strings/
|
||||
if [[ -n "$OUTPUT" ]]; then
|
||||
echo "console<<EOF" >> "$GITHUB_OUTPUT"
|
||||
echo "$OUTPUT" >> "$GITHUB_OUTPUT"
|
||||
echo "EOF" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
echo "exitCode=$RESULT" >> "$GITHUB_OUTPUT"
|
||||
|
||||
if [[ "$CATCH_ERRORS" != "true" ]]; then
|
||||
exit $RESULT
|
||||
fi
|
||||
Reference in New Issue
Block a user