Skip to content

Commit

Permalink
add MinIO action
Browse files Browse the repository at this point in the history
  • Loading branch information
RodolfoSilva committed Feb 15, 2023
1 parent f62b801 commit cd1a113
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM docker:stable

COPY entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# minio-action
MinIO S3 like
# MinIO Github Action

This [GitHub Action](https://github.com/features/actions) sets up MinIO instance.

Docker images source [minio/minio](https://hub.docker.com/r/minio/minio).

---

# Usage

See [action.yml](action.yml)

Basic:

```yaml
- name: Start UP MinIO
uses: infleet/[email protected]
with:
port: "9000"
version: "latest"
username: "minio"
password: "minio"
```
Now you should be able to connect to `MinIO` (S3 api) running at `localhost:9000`

---

## Configurations

| Name | Default | Required? | Description |
| ---------- | -------- | :-------: | ----------------------------------------------------------------------------------- |
| `version` | `latest` | [ ] | Version of MinIO |
| `port` | `9000` | [ ] | Port to forward the access to MinIO, S3 API like |
| `username` | | [x] | The username used to authenticate to S3 api, common used as `AWS_ACCESS_KEY_ID` |
| `password` | | [x] | The password used to authenticate to S3 api, common used as `AWS_SECRET_ACCESS_KEY` |
24 changes: 24 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "minio-action"
description: "SetUP MinIO"
author: "infleet"
branding:
icon: fast-forward
color: blue
inputs:
version:
description: "Version of MinIO"
required: false
default: "latest"
port:
description: "Port to forward the access to MinIO, S3 API like"
required: false
default: "9000"
username:
description: "The username used to authenticate to S3 api, common used as AWS_ACCESS_KEY_ID"
required: true
password:
description: "The password used to authenticate to S3 api, common used as AWS_SECRET_ACCESS_KEY"
required: true
runs:
using: "docker"
image: "Dockerfile"
11 changes: 11 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

sh -c "docker run \
--rm \
-d \
-p \"${INPUT_PORT}:9000\" \
-e MINIO_ROOT_USER=\"${INPUT_USERNAME}\" \
-e MINIO_ROOT_PASSWORD=\"${INPUT_PASSWORD}\" \
minio/minio:${INPUT_VERSION} \
server /data --address=0.0.0.0:9000 \
"

0 comments on commit cd1a113

Please sign in to comment.