From 2256d2fdfb6bbac992a175ffd8f90a0aa174a4da Mon Sep 17 00:00:00 2001 From: Sohrab Behdani Date: Tue, 18 Mar 2025 20:38:25 +0330 Subject: [PATCH] testing action --- .forgejo/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .forgejo/workflows/test.yml diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml new file mode 100644 index 0000000..ea18b70 --- /dev/null +++ b/.forgejo/workflows/test.yml @@ -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 }} +