From bc96e702a76a82bf2a7972e4b08e282336a49ca3 Mon Sep 17 00:00:00 2001 From: J Date: Thu, 4 Jul 2024 20:27:01 +1000 Subject: [PATCH 1/3] We need to be able to access the latest dev and main branch builds via the web for netboot --- .github/workflows/xnodeos-build-iso.yml | 9 +++++++++ .github/workflows/xnodeos-build-kexec.yml | 9 +++++++++ .github/workflows/xnodeos-build-netboot.yml | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/.github/workflows/xnodeos-build-iso.yml b/.github/workflows/xnodeos-build-iso.yml index ea1948dec78a9..24841a274db2d 100644 --- a/.github/workflows/xnodeos-build-iso.yml +++ b/.github/workflows/xnodeos-build-iso.yml @@ -23,3 +23,12 @@ jobs: with: name: XnodeOS-x86_64.iso path: result/iso/nixos.iso + - name: Upload Result to boot.opnm.sh + uses: appleboy/scp-action@v0.1.7 + with: + host: boot.opnm.sh + username: opnm + key: ${{secrets.BOOT_OPNM_SH_DEPLOY_KEY}} + source: result/iso/nixos.iso + target: /public/${{GITHUB_REF_NAME}}/iso + strip_components: 2 diff --git a/.github/workflows/xnodeos-build-kexec.yml b/.github/workflows/xnodeos-build-kexec.yml index d62362eac0cad..7021d7bd2d20f 100644 --- a/.github/workflows/xnodeos-build-kexec.yml +++ b/.github/workflows/xnodeos-build-kexec.yml @@ -24,3 +24,12 @@ jobs: with: name: xnodeos-kexec-system-x86_64-linux.tar.xz path: result/tarball/nixos-system-x86_64-linux.tar.xz + - name: Upload Result to boot.opnm.sh + uses: appleboy/scp-action@v0.1.7 + with: + host: boot.opnm.sh + username: opnm + key: ${{secrets.BOOT_OPNM_SH_DEPLOY_KEY}} + source: result/tarball/nixos-system-x86_64-linux.tar.xz + target: /public/latest/${{GITHUB_REF_NAME}}/kexec + strip_components: 2 diff --git a/.github/workflows/xnodeos-build-netboot.yml b/.github/workflows/xnodeos-build-netboot.yml index 8feb9c8f36738..cd2f56a215675 100644 --- a/.github/workflows/xnodeos-build-netboot.yml +++ b/.github/workflows/xnodeos-build-netboot.yml @@ -34,3 +34,12 @@ jobs: with: name: initrd path: result/initrd + - name: Upload Result to boot.opnm.sh + uses: appleboy/scp-action@v0.1.7 + with: + host: boot.opnm.sh + username: opnm + key: ${{secrets.BOOT_OPNM_SH_DEPLOY_KEY}} + source: "result/ipxe,result/kernel,result/initrd" + target: /public/latest/${{GITHUB_REF_NAME}}/netboot + strip_components: 1 From d202c25d8d261e0f055b4111babdfc7eff547a1d Mon Sep 17 00:00:00 2001 From: J Date: Thu, 4 Jul 2024 20:44:47 +1000 Subject: [PATCH 2/3] Nix store results of build are all symlinks and result needs to be plain files. Overwrite is required to replace symbolic main/dev references at same filenames. --- .github/workflows/xnodeos-build-iso.yml | 2 ++ .github/workflows/xnodeos-build-kexec.yml | 2 ++ .github/workflows/xnodeos-build-netboot.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/xnodeos-build-iso.yml b/.github/workflows/xnodeos-build-iso.yml index 24841a274db2d..fba85818a1e14 100644 --- a/.github/workflows/xnodeos-build-iso.yml +++ b/.github/workflows/xnodeos-build-iso.yml @@ -32,3 +32,5 @@ jobs: source: result/iso/nixos.iso target: /public/${{GITHUB_REF_NAME}}/iso strip_components: 2 + tar_dereference: true + overwrite: true diff --git a/.github/workflows/xnodeos-build-kexec.yml b/.github/workflows/xnodeos-build-kexec.yml index 7021d7bd2d20f..f22229d291f34 100644 --- a/.github/workflows/xnodeos-build-kexec.yml +++ b/.github/workflows/xnodeos-build-kexec.yml @@ -33,3 +33,5 @@ jobs: source: result/tarball/nixos-system-x86_64-linux.tar.xz target: /public/latest/${{GITHUB_REF_NAME}}/kexec strip_components: 2 + tar_dereference: true + overwrite: true diff --git a/.github/workflows/xnodeos-build-netboot.yml b/.github/workflows/xnodeos-build-netboot.yml index cd2f56a215675..8f8339ebce669 100644 --- a/.github/workflows/xnodeos-build-netboot.yml +++ b/.github/workflows/xnodeos-build-netboot.yml @@ -43,3 +43,5 @@ jobs: source: "result/ipxe,result/kernel,result/initrd" target: /public/latest/${{GITHUB_REF_NAME}}/netboot strip_components: 1 + tar_dereference: true + overwrite: true From 741c880fc14b37a614e94a4f4de7ff6e30040fa1 Mon Sep 17 00:00:00 2001 From: J Date: Fri, 5 Jul 2024 12:39:28 +1000 Subject: [PATCH 3/3] Use full path to server hosting directory because chroot config on server will not work with action implementation. --- .github/workflows/xnodeos-build-iso.yml | 2 +- .github/workflows/xnodeos-build-kexec.yml | 2 +- .github/workflows/xnodeos-build-netboot.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/xnodeos-build-iso.yml b/.github/workflows/xnodeos-build-iso.yml index fba85818a1e14..b8e8e8269e02a 100644 --- a/.github/workflows/xnodeos-build-iso.yml +++ b/.github/workflows/xnodeos-build-iso.yml @@ -30,7 +30,7 @@ jobs: username: opnm key: ${{secrets.BOOT_OPNM_SH_DEPLOY_KEY}} source: result/iso/nixos.iso - target: /public/${{GITHUB_REF_NAME}}/iso + target: /mnt/boot-opnm-sh/public/${{GITHUB_REF_NAME}}/iso strip_components: 2 tar_dereference: true overwrite: true diff --git a/.github/workflows/xnodeos-build-kexec.yml b/.github/workflows/xnodeos-build-kexec.yml index f22229d291f34..7a55f761a0e9c 100644 --- a/.github/workflows/xnodeos-build-kexec.yml +++ b/.github/workflows/xnodeos-build-kexec.yml @@ -31,7 +31,7 @@ jobs: username: opnm key: ${{secrets.BOOT_OPNM_SH_DEPLOY_KEY}} source: result/tarball/nixos-system-x86_64-linux.tar.xz - target: /public/latest/${{GITHUB_REF_NAME}}/kexec + target: /mnt/boot-opnm-sh/public/latest/${{GITHUB_REF_NAME}}/kexec strip_components: 2 tar_dereference: true overwrite: true diff --git a/.github/workflows/xnodeos-build-netboot.yml b/.github/workflows/xnodeos-build-netboot.yml index 8f8339ebce669..946e52fe1e3a1 100644 --- a/.github/workflows/xnodeos-build-netboot.yml +++ b/.github/workflows/xnodeos-build-netboot.yml @@ -41,7 +41,7 @@ jobs: username: opnm key: ${{secrets.BOOT_OPNM_SH_DEPLOY_KEY}} source: "result/ipxe,result/kernel,result/initrd" - target: /public/latest/${{GITHUB_REF_NAME}}/netboot + target: /mnt/boot-opnm-sh/public/latest/${{GITHUB_REF_NAME}}/netboot strip_components: 1 tar_dereference: true overwrite: true