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