From 2bf3a4c2eec567ed173e1518686a13469c9274d4 Mon Sep 17 00:00:00 2001 From: bakhtin Date: Thu, 3 Oct 2024 13:36:36 +0100 Subject: [PATCH] Add rclone step Signed-off-by: bakhtin --- .github/workflows/release.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 411e5a5..2734e96 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,6 +26,40 @@ jobs: run: | make azure-image + - name: Install rclone + run: | + curl -fSSL https://downloads.rclone.org/v1.68.1/rclone-v1.68.1-linux-amd64.deb -o rclone.deb + sudo dpkg -i rclone.deb + rm -f rclone.deb + + - name: Create test artifact + run: | + echo "test artifact" > /artifacts/cvm-image-azure-tdx.rootfs-20241002143710.wic + ln -s /artifacts/cvm-image-azure-tdx.rootfs-20241002143710.wic /artifacts/cvm-image-azure-tdx.rootfs.wic + + - name: Upload build artifacts + env: + AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} + run: + mkdir -p ~/.config/rclone + echo < ~/.config/rclone/rclone.conf + [r2] + type = s3 + provider = Cloudflare + env_auth = true + endpoint = ${{ secrets.R2_BUCKET_ENDPOINT }} + region = auto + acl = private + no_check_bucket = true + EOF + + rclone copy -v --transfers=2 --s3-upload-concurrency=40 \ + --contimeout=10m --retries 10 --retries-sleep 60s --error-on-no-transfer \ + --fast-list --checksum --copy-links \ + /artifacts/cvm-image-azure-tdx.rootfs.wic \ + r2:flashbots-public-artifacts/images/cvm-image-azure-tdx.rootfs.wic + - name: Cache build dependencies id: cache-build-save uses: WarpBuilds/cache/save@v1