mirror of https://github.com/zhaarey/wrapper.git
Compare commits
2 Commits
57dd342fd7
...
ca1f26a950
Author | SHA1 | Date |
---|---|---|
zhaarey | ca1f26a950 | 2 months ago |
zhaarey | 639f50bf4d | 2 months ago |
@ -1,4 +1,4 @@ |
||||
name: C/C++ CI |
||||
name: Build |
||||
|
||||
on: |
||||
push: |
@ -0,0 +1,47 @@ |
||||
name: wrapper-qemu |
||||
|
||||
on: |
||||
workflow_run: |
||||
workflows: ["Build"] |
||||
types: [completed] |
||||
|
||||
jobs: |
||||
on-success: |
||||
runs-on: ubuntu-latest |
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }} |
||||
steps: |
||||
- uses: actions/checkout@v4 |
||||
|
||||
- name: Download wrapper-qemu basic image |
||||
run: wget https://github.com/zhaarey/wrapper/releases/download/wrapper-qemu/wrapper.qcow2 |
||||
|
||||
- name: Mount image |
||||
run: | |
||||
sudo apt-get install -y qemu-utils |
||||
sudo modprobe nbd max_part=8 |
||||
sudo qemu-nbd --connect=/dev/nbd0 wrapper.qcow2 |
||||
sudo mkdir /mnt/wrapper |
||||
sudo mount /dev/nbd0p3 /mnt/wrapper/ |
||||
|
||||
- name: Download latest artifact |
||||
uses: dawidd6/action-download-artifact@v6 |
||||
with: |
||||
github_token: ${{secrets.ACTION_TOKEN}} |
||||
run_id: ${{ github.event.workflow_run.id }} |
||||
|
||||
- name: Copy wrapper to image |
||||
run: | |
||||
mv Wrapper.x86_64.* wrapper |
||||
sudo mv wrapper /mnt/wrapper/root/wrapper |
||||
sudo chmod +x /mnt/wrapper/root/wrapper/wrapper |
||||
|
||||
- name: Unmount image |
||||
run: | |
||||
sudo umount /mnt/wrapper/ |
||||
sudo qemu-nbd --disconnect /dev/nbd0 |
||||
|
||||
- name: Upload artifact |
||||
uses: actions/upload-artifact@v4 |
||||
with: |
||||
name: wrapper-qemu |
||||
path: wrapper.qcow2 |
Loading…
Reference in new issue