From 1198ae095deef167e7986989adfb57da1fa92faa Mon Sep 17 00:00:00 2001 From: Dinis Cruz Date: Sun, 8 Sep 2024 21:27:49 +0100 Subject: [PATCH] added docker__minio shared action --- .github/actions/docker__minio/action.yml | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/actions/docker__minio/action.yml diff --git a/.github/actions/docker__minio/action.yml b/.github/actions/docker__minio/action.yml new file mode 100644 index 0000000..a9edb49 --- /dev/null +++ b/.github/actions/docker__minio/action.yml @@ -0,0 +1,29 @@ +name: 'Start MinIO Server' +description: 'Start MinIO server for testing' + +runs: + using: 'composite' + steps: + - name: Set up Docker + uses: docker/setup-buildx-action@v3 + + - name: Run MinIO + shell: bash + run: | + docker run -d -p 9000:9000 -p 9001:9001 \ + -e MINIO_ROOT_USER=minioadmin \ + -e MINIO_ROOT_PASSWORD=minioadmin \ + --name minio-server \ + minio/minio:latest server /data --console-address ":9001" + + - name: Wait for MinIO to be ready + shell: bash + run: | + for i in {1..10}; do + if curl -s http://localhost:9001; then + echo "MinIO is ready" + break + fi + echo "Waiting for MinIO..." + sleep 5 + done