mirror of https://github.com/zhaarey/wrapper.git
Compare commits
No commits in common. 'ca1f26a950247fbd874a908dc7b600f0fab5d03b' and '57dd342fd7704cf4358f68dea44430c4f31b4a7a' have entirely different histories.
ca1f26a950
...
57dd342fd7
@ -1,4 +1,4 @@ |
|||||||
name: Build |
name: C/C++ CI |
||||||
|
|
||||||
on: |
on: |
||||||
push: |
push: |
@ -1,47 +0,0 @@ |
|||||||
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