From a7ac44b4bcfc68662dec5271f3d1cd8dd7fbf7ce Mon Sep 17 00:00:00 2001 From: Venkat Date: Mon, 25 Nov 2024 01:01:34 +0000 Subject: [PATCH] feat: uploading qcow image to github releases as an asset. --- .github/workflows/packer-qemu.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/packer-qemu.yml b/.github/workflows/packer-qemu.yml index 3448205..bf2abff 100644 --- a/.github/workflows/packer-qemu.yml +++ b/.github/workflows/packer-qemu.yml @@ -49,12 +49,18 @@ jobs: verbose: false arch: amd64 - - name: copy file to s3 storage + - name: Split qcow2 image into 1024M files and then upload to GitHub Releases as an Asset run: | - aws s3 cp images/${{ github.event.workflow_run.head_branch }}.qcow2 s3://${{ secrets.S3_BUCKET }}/${{ github.event.workflow_run.head_branch }}.qcow2 + mv images/${{ github.event.workflow_run.head_branch }}.qcow2 .. + tar -cvf ${{ github.event.workflow_run.head_branch }}.qcow2 + split -b 1024M ${{ github.event.workflow_run.head_branch }}.qcow2.tar ${{ github.event.workflow_run.head_branch }}.qcow2.tar.part_ + + - name: upload + uses: xresloader/upload-to-github-release@v1 env: - AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }} - AWS_DEFAULT_REGION: ${{ secrets.S3_BUCKET_REGION }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + file: "*.qcow2.tar.part_*" + tags: true + - \ No newline at end of file