diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 853c0f624..1e9c61b74 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -309,7 +309,7 @@ jobs: zip -r ../release/AI-on-the-edge-device__manual-setup__${{ steps.vars.outputs.branch }}.zip . # create AI-on-the-edge-device__remote-setup__*.zip like "AI-on-the-edge-device__remote-setup__v13.0.5.zip" - cd ../manual_setup + cd ../remote_setup zip -r ../release/AI-on-the-edge-device__remote-setup__${{ steps.vars.outputs.branch }}.zip . # extract the version used in next step @@ -363,9 +363,8 @@ jobs: ######################################################################################### ## Update the Web Installer on a release ######################################################################################### - update-web-installer: - needs: [release] - +# This is the same as in the update-webinstaller.yml + update-web-installer: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} @@ -380,27 +379,23 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - - name: Update update cache on every commit - uses: actions/cache@v3.2.3 + + - name: Get version of last release + id: last_release + uses: InsonusK/get-latest-release@v1.0.1 with: - path: update - key: update-${{ github.run_id }} - restore-keys: update # This matches above key as it is only used as a prefix. it the restores the nearest cache, see https://github.com/restore-keys:/blob/main/tips-and-workarounds.md#update-a-cache - - - name: Set Variables - id: vars - run: | - echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - echo "branch=$(echo ${{ github.ref_name }} | tr / __)" >> $GITHUB_OUTPUT - + myToken: ${{ github.token }} + exclude_types: "release" + view_top: 1 + - name: Add binary to Web Installer and update manifest run: | rm -f docs/binary/firmware.bin - cp -f update/firmware.bin docs/binary/firmware.bin + wget https://github.com/jomjol/AI-on-the-edge-device/releases/download/${{ steps.last_release.outputs.tag_name }}/AI-on-the-edge-device__update__${{ steps.last_release.outputs.tag_name }}.zip + unzip AI-on-the-edge-device__update__${{ steps.last_release.outputs.tag_name }}.zip + cp -f firmware.bin docs/binary/firmware.bin cp -f docs/manifest_template.json docs/manifest.json - sed -i 's/VERSION/${{ steps.vars.outputs.branch }}/g' docs/manifest.json - + sed -i 's/VERSION/${{ steps.last_release.outputs.tag_name }}/g' docs/manifest.json - name: Setup Pages uses: actions/configure-pages@v2 @@ -411,4 +406,4 @@ jobs: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v1 + uses: actions/deploy-pages@v1 diff --git a/.github/workflows/update-webinstaller.yml b/.github/workflows/update-webinstaller.yml new file mode 100644 index 000000000..f44ec79b2 --- /dev/null +++ b/.github/workflows/update-webinstaller.yml @@ -0,0 +1,61 @@ +# This updates the Web Installer with the files from the docs folder and the binary of the latest release +# it only gets run on: +# - Changes to the docs folder in the `rolling` branch +# - On a release + +name: Update Web Installer + +on: + repository_dispatch: # Run on manual trigger +# push: +# branches: +# - rolling +# paths: +# - docs # The path filter somehow does not work, so lets run it on every change to rolling + +jobs: + update-web-installer: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: + contents: read + pages: write + id-token: write + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Get version of last release + id: last_release + uses: InsonusK/get-latest-release@v1.0.1 + with: + myToken: ${{ github.token }} + exclude_types: "release" + view_top: 1 + + - name: Add binary to Web Installer and update manifest + run: | + rm -f docs/binary/firmware.bin + wget https://github.com/jomjol/AI-on-the-edge-device/releases/download/${{ steps.last_release.outputs.tag_name }}/AI-on-the-edge-device__update__${{ steps.last_release.outputs.tag_name }}.zip + unzip AI-on-the-edge-device__update__${{ steps.last_release.outputs.tag_name }}.zip + cp -f firmware.bin docs/binary/firmware.bin + cp -f docs/manifest_template.json docs/manifest.json + sed -i 's/VERSION/${{ steps.last_release.outputs.tag_name }}/g' docs/manifest.json + + - name: Setup Pages + uses: actions/configure-pages@v2 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: 'docs' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 + diff --git a/Changelog.md b/Changelog.md index fe3e8b99e..97083a360 100644 --- a/Changelog.md +++ b/Changelog.md @@ -151,8 +151,8 @@ Improve **u**ser e**x**perience 5. Now you can reboot. If anything breaks you can try to -1\. Call `http:///ota?task=update&file=firmware.bin` resp. `http:///ota?task=update&file=html.zip` if the upload successed but the extraction failed. -1\. Use the initial_esp32_setup.zip ( ) as alternative. +1. Call `http:///ota?task=update&file=firmware.bin` resp. `http:///ota?task=update&file=html.zip` if the upload successed but the extraction failed. +1. Use the initial_esp32_setup.zip ( ) as alternative. ### Added @@ -804,12 +804,8 @@ External Illumination - Initial Version -[Unreleased]: https://github.com/jomjol/AI-on-the-edge-device/compare/14.0.0-RC2...HEAD - [14.0.0-RC2]: https://github.com/jomjol/AI-on-the-edge-device/compare/13.0.8...14.0.0-RC2 -[14.0.0-RC1]: https://github.com/jomjol/AI-on-the-edge-device/compare/13.0.8...14.0.0-RC1 - [13.0.8]: https://github.com/jomjol/AI-on-the-edge-device/compare/12.0.1...13.0.8 [13.0.7]: https://github.com/jomjol/AI-on-the-edge-device/compare/12.0.1...13.0.7 diff --git a/docs/index.html b/docs/index.html index e542a976f..1573eb2f8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -2,15 +2,8 @@ AI on the Edge Device - Webinstaller - - + + @@ -22,15 +15,17 @@

This page provides the Webinstaller and a live USB Console to your AI-on-the-edge-device.
- For further information about AI-on-the-edge-device please go to https://github.com/jomjol/AI-on-the-edge-device.

+ + For further information about AI-on-the-edge-device please go to https://github.com/jomjol/AI-on-the-edge-device.

Notes:

  • For the installation, make sure to switch the ESP32 to Bootloader mode!
  • -
  • Beside the firmware, also the SD-Card needs to be flashed. This can be done manually or through an initial simple access point.
    Instructions see Wiki!
  • After the installation, a manual reset might be required!
  • Please note that not all webbrowsers and operating systems support the needed access to USB!
  • -
  • Check the Wiki for additional information.
  • +
  • Check the documentation for additional information.
  • +
  • The SD-Card still must be setup separately. This can be done manually or using the new Remote Setup. See the documentation for further instructions!
  • +

diff --git a/sd-card/html/ota_page.html b/sd-card/html/ota_page.html index 3c69f6806..ddee596df 100644 --- a/sd-card/html/ota_page.html +++ b/sd-card/html/ota_page.html @@ -39,10 +39,10 @@

OTA Update

Update

On the Release Page, pick the AI-on-the-edge-device__update__*.zip file!

-

Alternatively the following file formats are supported (Make sure the file extention is lower case):

+

Alternatively the following file types are supported:

  • *.zip → Gets unpacked on the SD-Card (most top folder)
  • -
  • *.bin → gets installed onto the ESP32
  • +
  • *.bin → gets installed onto the ESP32s program flash
  • *.tfl/tflite → Gets copied to your SD-Card/config
@@ -108,10 +108,10 @@

Status: idle

* - firmware__*.bin * - *.ftl * - *.tflite */ - if ( /(^AI-on-the-edge-device__update__)[a-z0-9()_\-.]*(\.zip$)/.test(filename) || // OK - ( /(^AI-on-the-edge-device__firmware)[a-z0-9()_\-.]*(\.bin$)/.test(filename)) || - ( /[a-z0-9()_\-.]*(\.tfl$)/.test(filename)) || - ( /[a-z0-9()_\-.]*(\.tflite$)/.test(filename))) { + if ( /(^AI-on-the-edge-device__update__)[a-zRC0-9()_\-.]*(\.zip$)/i.test(filename) || // OK + ( /(^AI-on-the-edge-device__firmware)[a-zRC0-9()_\-.]*(\.bin$)/i.test(filename)) || + ( /[a-zRC0-9()_\-.]*(\.tfl$)/i.test(filename)) || + ( /[a-zRC0-9()_\-.]*(\.tflite$)/i.test(filename))) { firework.launch('Great, the filename matches our expectations. You can now press "Upload and install".', 'success', 5000); } /* Following filenames are acceptiod but not prefered: