Skip to content

Commit 5f44bc8

Browse files
committed
update balena os
1 parent b7c1662 commit 5f44bc8

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

.github/workflows/deploy-release-prod.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ on:
99

1010
jobs:
1111
deploy-release:
12+
strategy:
13+
max-parallel: 3
14+
matrix:
15+
device:
16+
- type: raspberrypi3
17+
fleet: info319/coderbot
1218
runs-on: ubuntu-latest
1319
environment: prod
1420
outputs:
@@ -19,13 +25,24 @@ jobs:
1925
id: build
2026
with:
2127
balena_token: ${{ secrets.BALENA_TOKEN }}
22-
fleet: ${{ vars.BALENA_FLEET }}
28+
fleet: ${{ matrix.device.fleet }}
2329
registry_secrets: ${{ secrets.GHCR_CREDS }}
2430
source: .
2531
- name: Log release ID built
2632
run: echo "Built release version ${{ steps.build.outputs.release_id }}"
2733

2834
build-balena:
35+
strategy:
36+
matrix:
37+
device:
38+
- type: raspberrypi3
39+
version: v5.3.7.dev
40+
fleet: info319/coderbot
41+
env:
42+
IMAGE_NAME: coderbot_${{ matrix.device.type }}.img
43+
DEVICE_TYPE: ${{ matrix.device.type }}
44+
DEVICE_VERSION: ${{ matrix.device.version }}
45+
BALENA_FLEET: ${{ matrix.device.fleet }}
2946
needs: deploy-release
3047
runs-on: ubuntu-latest
3148
environment: prod
@@ -36,20 +53,21 @@ jobs:
3653
- run: export PATH=$PATH:$(pwd)/balena-cli
3754
- run: ./balena-cli/balena --version
3855
- run: ./balena-cli/balena login --token ${{ secrets.BALENA_TOKEN }}
39-
- run: ./balena-cli/balena os download raspberrypi3 --version v5.1.20+rev1.dev --output raspberrypi3.img
56+
- run: ./balena-cli/balena os download $DEVICE_TYPE --version $DEVICE_VERSION --output $IMAGE_NAME
4057
- run: sudo mkdir /mnt/resin-boot
41-
- run: sudo mount -o loop,offset=$(( 512 * 8192)) raspberrypi3.img /mnt/resin-boot
58+
- run: sudo mount -o loop,offset=$(( 512 * 8192)) $IMAGE_NAME /mnt/resin-boot
4259
- run: sudo cp rpi/config.txt /mnt/resin-boot
4360
- run: sudo umount /mnt/resin-boot
44-
- run: ./balena-cli/balena config generate --version 5.1.20+rev1.dev --deviceType raspberrypi3 --fleet ${{ vars.BALENA_FLEET }} --network ethernet --appUpdatePollInterval 10 --dev -o config.json
45-
- run: ./balena-cli/balena os configure raspberrypi3.img --fleet ${{ vars.BALENA_FLEET }} --config config.json --config-network ethernet
46-
- run: sudo ./balena-cli/balena config write --drive raspberrypi3.img hostname coderbot
61+
- run: ./balena-cli/balena config generate --version $DEVICE_VERSION --deviceType $DEVICE_TYPE --fleet $BALENA_FLEET --network ethernet --appUpdatePollInterval 10 --dev -o config.json
62+
- run: ./balena-cli/balena os configure $IMAGE_NAME --fleet $BALENA_FLEET --config config.json --config-network ethernet
63+
- run: sudo ./balena-cli/balena config write --drive $IMAGE_NAME hostname coderbot
4764
- run: echo "RELEASE_COMMIT=current" >> $GITHUB_ENV #echo "RELEASE_COMMIT=$(./balena-cli/balena release ${{ needs.deploy-release.outputs.release_id }}|grep 'COMMIT'|awk '{print $2}')" >> $GITHUB_ENV
48-
- run: ./balena-cli/balena preload raspberrypi3.img --fleet ${{ vars.BALENA_FLEET }} -c $RELEASE_COMMIT
65+
- run: ./balena-cli/balena preload $IMAGE_NAME --fleet $BALENA_FLEET -c $RELEASE_COMMIT
4966
- run: mkdir -p dist
50-
- run: mv raspberrypi3.img ./dist/.
67+
- run: mv $IMAGE_NAME ./dist/.
5168
- name: Archive dist
5269
uses: actions/upload-artifact@v3
5370
with:
5471
name: image-preloaded
5572
path: dist
73+

.github/workflows/deploy-release-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
matrix:
4141
device:
4242
- type: raspberrypi3
43-
version: 5.1.8
43+
version: v5.3.7.dev
4444
fleet: info319/coderbot_test
4545
- type: raspberrypi3-64
4646
version: v5.0.8.dev

0 commit comments

Comments
 (0)