This commit is contained in:
parent
64e32da737
commit
2256d2fdfb
1 changed files with 37 additions and 0 deletions
37
.forgejo/workflows/test.yml
Normal file
37
.forgejo/workflows/test.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
name: Upload hello.txt to S3
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
upload:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create hello.txt
|
||||||
|
run: echo "Hello, Forgejo CI!" > hello.txt
|
||||||
|
|
||||||
|
- name: Install MinIO Client (mc)
|
||||||
|
run: |
|
||||||
|
curl -O https://dl.min.io/client/mc/release/linux-amd64/mc
|
||||||
|
chmod +x mc
|
||||||
|
sudo mv mc /usr/local/bin/
|
||||||
|
|
||||||
|
- name: Configure MinIO Client
|
||||||
|
run: |
|
||||||
|
mc alias set myminio $S3_ENDPOINT $S3_ACCESS_KEY $S3_SECRET_KEY
|
||||||
|
|
||||||
|
- name: Upload file to S3
|
||||||
|
run: |
|
||||||
|
mc cp hello.txt myminio/$S3_BUCKET_NAME/hello.txt
|
||||||
|
|
||||||
|
env:
|
||||||
|
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
|
||||||
|
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
|
||||||
|
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
|
||||||
|
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue