Github Actions でテスト用のS3を使う
2752 ワード
github/workflows/s3-local.yml
name: s3-local
on:
pull_request:
jobs:
s3:
runs-on: ubuntu-18.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
Author And Source
この問題について(Github Actions でテスト用のS3を使う), 我々は、より多くの情報をここで見つけました https://qiita.com/nakamasato/items/1ec18bc984054e2850f4著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .