Skip to content

Merge pull request #111 from containeroo/renovate/ghcr.io-containeroo… #134

Merge pull request #111 from containeroo/renovate/ghcr.io-containeroo…

Merge pull request #111 from containeroo/renovate/ghcr.io-containeroo… #134

Workflow file for this run

---
name: Test
on:
push:
paths:
- mirrio.sh
- Dockerfile
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up Minio
run: |
docker build -t test/mirrio .
docker network create minio
docker run -d --network minio -p 9000:9000 -e "MINIO_ACCESS_KEY=minio" -e "MINIO_SECRET_KEY=minio123" --name minio1 minio/minio server /data
docker run -d --network minio -p 9001:9000 -e "MINIO_ACCESS_KEY=minio" -e "MINIO_SECRET_KEY=minio123" --name minio2 minio/minio server /data
- name: Install Minio Client
run: |
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/
- name: Create test buckets
run: |
mc config host add minio1 http://localhost:9000 minio minio123
mc config host add minio2 http://localhost:9001 minio minio123
mc mb minio1/source
mc mb minio2/destination
- name: Upload test object
run: |
echo "hello, world!" > test.txt
mc cp test.txt minio1/source/
- name: Sync buckets
run: |
docker ps
mc ls minio1/source
mc ls minio2/destination
docker run \
--network minio \
-e SOURCE_URL=http://minio1:9000 \
-e SOURCE_ACCESSKEY=minio \
-e SOURCE_SECRETKEY=minio123 \
-e DESTINATION_URL=http://minio2:9000 \
-e DESTINATION_ACCESSKEY=minio \
-e DESTINATION_SECRETKEY=minio123 \
-e SOURCE_BUCKET=source \
-e DESTINATION_BUCKET=destination \
test/mirrio