-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (31 loc) · 1.28 KB
/
s3-local.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: s3-local
on:
pull_request:
branches:
- nonexist # this workflow is broken
jobs:
s3:
runs-on: ubuntu-24.04
steps:
- name: run minio
run: |
docker run -d -p 9000:9000 --name minio \
-e "MINIO_ACCESS_KEY=ABCDEFGHIJKLMN" \
-e "MINIO_SECRET_KEY=0123456789" \
-v /tmp/data:/data \
-v /tmp/config:/root/.minio \
minio/minio server /data
- name: check s3 command
env:
AWS_ACCESS_KEY_ID: "ABCDEFGHIJKLMN"
AWS_SECRET_ACCESS_KEY: "0123456789"
run: |
echo "hello" > ~/test.txt
cat ~/test.txt
aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test-bucket # make bucket
aws --endpoint-url http://127.0.0.1:9000/ s3 ls
aws --endpoint-url http://127.0.0.1:9000/ s3 cp ~/test.txt s3://test-bucket # cp
aws --endpoint-url http://127.0.0.1:9000/ s3 ls s3://test-bucket # ls
aws --endpoint-url http://127.0.0.1:9000/ s3 cp s3://test-bucket/test.txt - # check content
aws --endpoint-url http://127.0.0.1:9000/ s3 rm s3://test-bucket/test.txt # rm object
aws --endpoint-url http://127.0.0.1:9000/ s3 rb s3://test-bucket # remove bucket