Skip to content

Commit cd1a113

Browse files
committed
add MinIO action
1 parent f62b801 commit cd1a113

File tree

4 files changed

+78
-2
lines changed

4 files changed

+78
-2
lines changed

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM docker:stable
2+
3+
COPY entrypoint.sh /entrypoint.sh
4+
5+
RUN chmod +x /entrypoint.sh
6+
7+
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
1-
# minio-action
2-
MinIO S3 like
1+
# MinIO Github Action
2+
3+
This [GitHub Action](https://github.com/features/actions) sets up MinIO instance.
4+
5+
Docker images source [minio/minio](https://hub.docker.com/r/minio/minio).
6+
7+
---
8+
9+
# Usage
10+
11+
See [action.yml](action.yml)
12+
13+
Basic:
14+
15+
```yaml
16+
- name: Start UP MinIO
17+
uses: infleet/[email protected]
18+
with:
19+
port: "9000"
20+
version: "latest"
21+
username: "minio"
22+
password: "minio"
23+
```
24+
25+
Now you should be able to connect to `MinIO` (S3 api) running at `localhost:9000`
26+
27+
---
28+
29+
## Configurations
30+
31+
| Name | Default | Required? | Description |
32+
| ---------- | -------- | :-------: | ----------------------------------------------------------------------------------- |
33+
| `version` | `latest` | [ ] | Version of MinIO |
34+
| `port` | `9000` | [ ] | Port to forward the access to MinIO, S3 API like |
35+
| `username` | | [x] | The username used to authenticate to S3 api, common used as `AWS_ACCESS_KEY_ID` |
36+
| `password` | | [x] | The password used to authenticate to S3 api, common used as `AWS_SECRET_ACCESS_KEY` |

action.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "minio-action"
2+
description: "SetUP MinIO"
3+
author: "infleet"
4+
branding:
5+
icon: fast-forward
6+
color: blue
7+
inputs:
8+
version:
9+
description: "Version of MinIO"
10+
required: false
11+
default: "latest"
12+
port:
13+
description: "Port to forward the access to MinIO, S3 API like"
14+
required: false
15+
default: "9000"
16+
username:
17+
description: "The username used to authenticate to S3 api, common used as AWS_ACCESS_KEY_ID"
18+
required: true
19+
password:
20+
description: "The password used to authenticate to S3 api, common used as AWS_SECRET_ACCESS_KEY"
21+
required: true
22+
runs:
23+
using: "docker"
24+
image: "Dockerfile"

entrypoint.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
sh -c "docker run \
4+
--rm \
5+
-d \
6+
-p \"${INPUT_PORT}:9000\" \
7+
-e MINIO_ROOT_USER=\"${INPUT_USERNAME}\" \
8+
-e MINIO_ROOT_PASSWORD=\"${INPUT_PASSWORD}\" \
9+
minio/minio:${INPUT_VERSION} \
10+
server /data --address=0.0.0.0:9000 \
11+
"

0 commit comments

Comments
 (0)