From e6350667df187bc8b5737d3d59fea906dc30933f Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 9 Feb 2024 19:53:49 +0100 Subject: [PATCH] fixed hardcoded download URLs --- .github/workflows/make_usb.yml | 3 +-- create-usb-image.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/make_usb.yml b/.github/workflows/make_usb.yml index ac19d69..ca5ec2e 100644 --- a/.github/workflows/make_usb.yml +++ b/.github/workflows/make_usb.yml @@ -16,8 +16,7 @@ jobs: - name: Create USB Image run: | sudo apt-get install grub-efi-amd64 parted kpartx - chmod +x ./create-usb-image.sh - sudo ./create-usb-image.sh ${{ github.event.release.tag_name }} + sudo ./create-usb-image.sh "https://github.com/${{github.repository}}/releases/download/${{ github.event.release.tag_name }}" - name: Release uses: softprops/action-gh-release@v1 diff --git a/create-usb-image.sh b/create-usb-image.sh index 5c3d47f..c7303a9 100755 --- a/create-usb-image.sh +++ b/create-usb-image.sh @@ -2,11 +2,11 @@ set -e -targetrelease=$1 +dl_url=$1 -if [ -z "$targetrelease" ]; then - echo "Usage: $0 " - echo "Example: $0 20231208" +if [ -z "$dl_url" ]; then + echo "Usage: $0 " + echo "Example: $0 https://github.com/fogproject/fos/releases/download/20231208" exit 1 fi @@ -35,8 +35,8 @@ echo Install GRUB grub-install --removable --no-nvram --no-uefi-secure-boot --efi-directory=/mnt --boot-directory=/mnt/boot --target=x86_64-efi echo Download the FOG kernels and inits -wget -P /mnt/boot/ https://github.com/geek-at/fos/releases/download/$targetrelease/bzImage -wget -P /mnt/boot/ https://github.com/geek-at/fos/releases/download/$targetrelease/init.xz +wget -P /mnt/boot/ ${dl_url}/bzImage +wget -P /mnt/boot/ ${dl_url}/init.xz wget -P /mnt/boot/ https://github.com/FOGProject/fogproject/blob/dev-branch/packages/web/service/ipxe/memdisk wget -P /mnt/boot/ https://github.com/FOGProject/fogproject/blob/dev-branch/packages/web/service/ipxe/memtest.bin wget -P /mnt/boot/ https://github.com/FOGProject/fogproject/blob/dev-branch/packages/tftp/ipxe.krn