Skip to content

Commit

Permalink
feat: uploading qcow image to github releases as an asset.
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatamutyala authored Nov 25, 2024
1 parent 0887a04 commit a7ac44b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/packer-qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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



0 comments on commit a7ac44b

Please sign in to comment.