From f3fa05356ddc47781b37c181600224b5d036bbe0 Mon Sep 17 00:00:00 2001 From: Elias Bakken Date: Fri, 24 Nov 2023 12:55:41 +0100 Subject: [PATCH] Remove Octoprint, Mainsail and Reflash from the build, they are handled elsewhere. --- .github/workflows/build.yml | 116 +++++++++++++-------------- armbian/customize-image-octoprint.sh | 16 ++++ armbian/customize-image-reflash.sh | 16 ++++ 3 files changed, 90 insertions(+), 58 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70b3570..fda0ede 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,45 +29,45 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} prerelease: true - build-mainsail: - runs-on: self-hosted - steps: - - uses: actions/checkout@v3 - - - name: Remove old images - run: rm -f ../images/rebuild-mainsail-*.img.xz - - - name: Run build - run: ./rebuild.sh mainsail - - - name: Release if tagged - uses: ncipollo/release-action@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - allowUpdates: true - artifacts: ../images/rebuild-mainsail-v*.img.xz - token: ${{ secrets.GITHUB_TOKEN }} - prerelease: true - - build-octoprint: - runs-on: self-hosted - steps: - - uses: actions/checkout@v3 - - - name: Remove old images - run: rm -f ../images/rebuild-octoprint-*.img.xz - - - name: Run build - run: ./rebuild.sh octoprint - - - name: Release if tagged - uses: ncipollo/release-action@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - allowUpdates: true - artifacts: ../images/rebuild-octoprint-v*.img.xz - token: ${{ secrets.GITHUB_TOKEN }} - prerelease: true + # build-mainsail: + # runs-on: self-hosted + # steps: + # - uses: actions/checkout@v3 + + # - name: Remove old images + # run: rm -f ../images/rebuild-mainsail-*.img.xz + + # - name: Run build + # run: ./rebuild.sh mainsail + + # - name: Release if tagged + # uses: ncipollo/release-action@v1 + # if: startsWith(github.ref, 'refs/tags/') + # with: + # allowUpdates: true + # artifacts: ../images/rebuild-mainsail-v*.img.xz + # token: ${{ secrets.GITHUB_TOKEN }} + # prerelease: true + + # build-octoprint: + # runs-on: self-hosted + # steps: + # - uses: actions/checkout@v3 + + # - name: Remove old images + # run: rm -f ../images/rebuild-octoprint-*.img.xz + + # - name: Run build + # run: ./rebuild.sh octoprint + + # - name: Release if tagged + # uses: ncipollo/release-action@v1 + # if: startsWith(github.ref, 'refs/tags/') + # with: + # allowUpdates: true + # artifacts: ../images/rebuild-octoprint-v*.img.xz + # token: ${{ secrets.GITHUB_TOKEN }} + # prerelease: true build-fluidd: runs-on: self-hosted @@ -89,22 +89,22 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} prerelease: true - build-reflash: - runs-on: self-hosted - steps: - - uses: actions/checkout@v3 - - - name: Remove old images - run: rm -f ../images/rebuild-reflash-*.img.xz - - - name: Run build - run: ./rebuild.sh reflash - - - name: Release if tagged - uses: ncipollo/release-action@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - allowUpdates: true - artifacts: ../images/rebuild-reflash-v*.img.xz - token: ${{ secrets.GITHUB_TOKEN }} - prerelease: true + # build-reflash: + # runs-on: self-hosted + # steps: + # - uses: actions/checkout@v3 + + # - name: Remove old images + # run: rm -f ../images/rebuild-reflash-*.img.xz + + # - name: Run build + # run: ./rebuild.sh reflash + + # - name: Release if tagged + # uses: ncipollo/release-action@v1 + # if: startsWith(github.ref, 'refs/tags/') + # with: + # allowUpdates: true + # artifacts: ../images/rebuild-reflash-v*.img.xz + # token: ${{ secrets.GITHUB_TOKEN }} + # prerelease: true diff --git a/armbian/customize-image-octoprint.sh b/armbian/customize-image-octoprint.sh index a9c56cd..b2b2fe1 100644 --- a/armbian/customize-image-octoprint.sh +++ b/armbian/customize-image-octoprint.sh @@ -173,6 +173,20 @@ prepare_build() { cp /tmp/overlay/rebuild/rebuild-version /etc/refactor.version } +add_overlays(){ + mkdir /boot/overlay-user + cp /tmp/overlay/dts/* /boot/overlay-user + armbian-add-overlay /boot/overlay-user/sun50i-a64-usb-device.dts +} + +fix_netplan(){ + cat <<- EOF > /etc/netplan/armbian-default.yaml + network: + version: 2 + renderer: NetworkManager + EOF +} + post_build() { echo "🍰 Post build" # Force debian to change password @@ -189,6 +203,8 @@ install_octoprint install_ustreamer install_bins install_autohotspot +add_overlays +fix_netplan post_build echo "🍰 Rebuild finished" diff --git a/armbian/customize-image-reflash.sh b/armbian/customize-image-reflash.sh index 82607c9..9a95d90 100644 --- a/armbian/customize-image-reflash.sh +++ b/armbian/customize-image-reflash.sh @@ -50,10 +50,26 @@ install_autohotspot() { systemctl enable autohotspot.service } +add_overlays(){ + mkdir /boot/overlay-user + cp /tmp/overlay/dts/* /boot/overlay-user + armbian-add-overlay /boot/overlay-user/sun50i-a64-usb-device.dts +} + +fix_netplan(){ + cat <<- EOF > /etc/netplan/armbian-default.yaml + network: + version: 2 + renderer: NetworkManager + EOF +} + set -e echo "🍰 Reflash starting..." prepare_install install_reflash install_autohotspot +add_overlays +fix_netplan echo "🍰 Custom script completed"