From a04b5b1c12ea45dbb144c59a688461c40d2dd390 Mon Sep 17 00:00:00 2001 From: Yukari Chiba Date: Sun, 21 Jul 2024 15:02:46 +0800 Subject: [PATCH] add workflow to sync cloudflare r2 and oracle --- .github/workflows/publish_iso.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/publish_iso.yml b/.github/workflows/publish_iso.yml index 9b86a5d..234bbba 100644 --- a/.github/workflows/publish_iso.yml +++ b/.github/workflows/publish_iso.yml @@ -53,3 +53,29 @@ jobs: name: eweos-${{ matrix.arch }}-${{ matrix.variant }} path: results/ compression-level: 0 + - name: Install s3cmd + if: github.event_name != 'pull_request' + run: sudo apt -y install s3cmd + - name: Upload to Cloudflare R2 + if: github.event_name != 'pull_request' + run: | + s3cmd \ + --access_key=${{ secrets.CF_IMG_S3_ACCESS_KEY }} \ + --secret_key=${{ secrets.CF_IMG_S3_SECRET_KEY }} \ + --host=${{ secrets.CF_IMG_S3_HOST }} \ + --host-bucket=${{ secrets.CF_IMG_S3_HOST_BUCKET }} \ + --bucket-location=auto \ + --disable-multipart \ + put results/* s3://eweos/eweos-images/ + - name: Upload to Oracle Object Storage + if: github.event_name != 'pull_request' + run: | + s3cmd \ + --access_key=${{ secrets.ORC_IMG_S3_ACCESS_KEY }} \ + --secret_key=${{ secrets.ORC_IMG_S3_SECRET_KEY }} \ + --host=${{ secrets.ORC_IMG_S3_HOST }} \ + --host-bucket=${{ secrets.ORC_IMG_S3_HOST_BUCKET }} \ + --bucket-location=auto \ + --disable-multipart \ + put results/* s3://eweos-repo/eweos-images/ +