From ca317466e6e3e5fd4dda97106ff81c0c25b8b5c3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 6 Aug 2023 01:01:35 +0100 Subject: [PATCH] Update OpenFleet core files (production) --- .github/workflows/build-open-fleet.yml | 37 ++++++++++++++++++++------ 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-open-fleet.yml b/.github/workflows/build-open-fleet.yml index a579568..9911f63 100644 --- a/.github/workflows/build-open-fleet.yml +++ b/.github/workflows/build-open-fleet.yml @@ -11,8 +11,10 @@ env: raspberrypi4-64: 3.1.1 raspberrypicm4-ioboard: 2.112.12 rockpi-4b-rk3399: 2.108.25+rev1 - balena-bobcat-image: 2023.07.17 + balena-bobcat-px30-image: 2023.07.17 bobcat-px30: 2.115.3 + balena-bobcat-rk3566-image: 2023.08.02 + bobcat-rk3566: 2.115.3 cloud: nebra-cloud jobs: @@ -138,8 +140,18 @@ jobs: if: github.event.repository.name == 'helium-bobcat-px30' && env.BRANCH == 'master' with: repo: 'NebraLtd/balena-bobcat-px30' - version: 'tags/${{ env.balena-bobcat-image }}' - file: 'balena-image-bobcat-px30-${{ env.balena-bobcat-image }}.img.zip' + version: 'tags/${{ env.balena-bobcat-px30-image }}' + file: 'balena-image-bobcat-px30-${{ env.balena-bobcat-px30-image }}.img.zip' + target: 'images/balena-base-${{ github.event.repository.name }}.img.zip' + token: ${{ secrets.MR_BUMP }} + + - name: Download Bobcat RK3566 base Balena OS image + uses: dsaltares/fetch-gh-release-asset@master + if: github.event.repository.name == 'helium-bobcat-rk3566' && env.BRANCH == 'master' + with: + repo: 'NebraLtd/balena-bobcat-rk3566' + version: 'tags/${{ env.balena-bobcat-rk3566-image }}' + file: 'balena-image-bobcat-px30-${{ env.balena-bobcat-rk3566-image }}.img.zip' target: 'images/balena-base-${{ github.event.repository.name }}.img.zip' token: ${{ secrets.MR_BUMP }} @@ -189,6 +201,9 @@ jobs: elif [ ${{ github.event.repository.name }} == 'helium-bobcat-px30' ] ; then balena_os="isg-503" balena_os_version="${{ env.bobcat-px30 }}" + elif [ ${{ github.event.repository.name }} == 'helium-bobcat-rk3566' ] ; then + balena_os="rockpro64" + balena_os_version="${{ env.bobcat-rk3566 }}" elif [ ${{ env.ROCKPI }} == 'YES' ] ; then balena_os="rockpi-4b-rk3399" balena_os_version="${{ env.rockpi-4b-rk3399 }}" @@ -204,7 +219,7 @@ jobs: fi if $NODRYRUN ; then - if [ ${{ github.event.repository.name }} != 'helium-bobcat-px30' ] ; then + if [ ${{ github.event.repository.name }} != 'helium-bobcat-px30' ] && [ ${{ github.event.repository.name }} != 'helium-bobcat-rk3566' ]; then # Download the base image balena os download "$balena_os" \ -o "$base_image_path" \ @@ -266,7 +281,7 @@ jobs: fi if $NODRYRUN ; then - if [ ${{ github.event.repository.name }} != 'helium-bobcat-px30' ] ; then + if [ ${{ github.event.repository.name }} != 'helium-bobcat-px30' ] && [ ${{ github.event.repository.name }} != 'helium-bobcat-rk3566' ]; then balena os configure "$image_path" \ --fleet "nebraltd/$fleet_name" \ --config-network ethernet \ @@ -300,8 +315,8 @@ jobs: sudo balena config inject $final_json_filename --drive "$image_path" fi - if [ ${{ github.event.repository.name }} == 'helium-bobcat-px30' ] ; then - # Overwrite device type from "bobcat-px30" to "isg-503" + if [ ${{ github.event.repository.name }} == 'helium-bobcat-px30' ] || [ ${{ github.event.repository.name }} == 'helium-bobcat-rk3566' ]; then + # Overwrite device type from bobcat specific to balena specific if $VERBOSE ; then echo "Overwriting device-type" fi @@ -311,7 +326,13 @@ jobs: loop_dev=$(losetup -l | grep $(basename "${image_path}") | cut -d ' ' -f 1) tmpdir=$(mktemp -d) sudo mount ${loop_dev}p1 ${tmpdir} - sudo sed -i 's/"slug": "bobcat-px30"/"slug": "isg-503"/' ${tmpdir}/device-type.json + + if [ ${{ github.event.repository.name }} == 'helium-bobcat-px30' ]; then + sudo sed -i 's/"slug": "bobcat-px30"/"slug": "isg-503"/' ${tmpdir}/device-type.json + elif [ ${{ github.event.repository.name }} == 'helium-bobcat-rk3566' ]; then + sudo sed -i 's/"slug": "bobcat-rk3566"/"slug": "rockpro64"/' ${tmpdir}/device-type.json + fi + sudo umount ${tmpdir} sudo losetup -d ${loop_dev} fi