Skip to content

Commit

Permalink
Merge pull request #264 from NebraLtd/shawaj/rockpiagain
Browse files Browse the repository at this point in the history
fix: revert privileged containers and add rockpi builds
  • Loading branch information
shawaj authored Nov 28, 2021
2 parents e6fac69 + abb8669 commit 556929d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 72 deletions.
81 changes: 16 additions & 65 deletions .github/workflows/push-to-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,85 +7,36 @@ on:
- production

jobs:
outdoor-868:
build-prod:
runs-on: ubuntu-latest
strategy:
matrix:
sbc: [raspi, rockpi]
frequency: [470, 868, 915]
variant: [indoor, outdoor]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Change i2c bus for RockPi
if: matrix.sbc == 'rockpi'
run: |
sed -i -E "s/\/dev\/i2c-1:\/dev\/i2c-1/\/dev\/i2c-7:\/dev\/i2c-7/g" docker-compose.yml
ROCKPI="-rockpi"
echo "ROCKPI=$ROCKPI" >> $GITHUB_ENV
- name: Balena Deploy
uses: nebraltd/balena-cli-action@v12.51.1
uses: nebraltd/balena-cli-action@v12.54.5
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-outdoor-868 --logs --debug --nocache --build"

indoor-868:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-indoor-868 --logs --debug --nocache --build"

outdoor-915:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-outdoor-915 --logs --debug --nocache --build"

indoor-915:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-indoor-915 --logs --debug --nocache --build"

outdoor-470:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-outdoor-470 --logs --debug --nocache --build"

indoor-470:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/[email protected]
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-indoor-470 --logs --debug --nocache --build"
balena_command: "deploy nebraltd/helium-${{ matrix.variant }}-${{ matrix.frequency }}${{ env.ROCKPI }} --logs --debug --nocache --build"

open-fleet:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/balena-cli-action@v12.51.1
uses: nebraltd/balena-cli-action@v12.54.5
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
Expand All @@ -97,7 +48,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Balena Deploy
uses: nebraltd/balena-cli-action@v12.51.1
uses: nebraltd/balena-cli-action@v12.54.5
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/push-to-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@ on:
jobs:
testnet:
runs-on: ubuntu-latest
strategy:
matrix:
sbc: [raspi, rockpi]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Change i2c bus for RockPi
if: matrix.sbc == 'rockpi'
run: |
sed -i -E "s/\/dev\/i2c-1:\/dev\/i2c-1/\/dev\/i2c-7:\/dev\/i2c-7/g" docker-compose.yml
ROCKPI="-rockpi"
echo "ROCKPI=$ROCKPI" >> $GITHUB_ENV
- name: Balena Deploy
uses: nebraltd/balena-cli-action@v12.51.1
uses: nebraltd/balena-cli-action@v12.54.5
if: success()
with:
balena_api_token: ${{secrets.BALENA_API_TOKEN}}
balena_command: "deploy nebraltd/helium-testnet --logs --debug --nocache --build"
balena_command: "deploy nebraltd/helium-testnet${{ env.ROCKPI }} --logs --debug --nocache --build"
12 changes: 7 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- dbus-session
- diagnostics
environment:
- FIRMWARE_VERSION=2021.11.26.1-2
- FIRMWARE_VERSION=2021.11.26.1-3
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
- DBUS_SESSION_BUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
privileged: true
Expand Down Expand Up @@ -50,7 +50,8 @@ services:
- dbus:/session/dbus
cap_add:
- SYS_RAWIO
privileged: true
devices:
- /dev/i2c-1:/dev/i2c-1
restart: on-failure
environment:
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
Expand All @@ -59,7 +60,7 @@ services:
diagnostics:
image: nebraltd/hm-diag:625ea72
environment:
- FIRMWARE_VERSION=2021.11.26.1-2
- FIRMWARE_VERSION=2021.11.26.1-3
- DIAGNOSTICS_VERSION=625ea72
- DBUS_SYSTEM_BUS_ADDRESS=unix:path=/host/run/dbus/system_bus_socket
volumes:
Expand All @@ -69,7 +70,8 @@ services:
- "80:5000"
cap_add:
- SYS_RAWIO
privileged: true
devices:
- /dev/i2c-1:/dev/i2c-1
labels:
io.balena.features.sysfs: 1
io.balena.features.procfs: 1
Expand All @@ -89,7 +91,7 @@ services:
- dbus:/session/dbus
environment:
- DBUS_ADDRESS=unix:path=/session/dbus/session_bus_socket
- FIRMWARE_VERSION=2021.11.26.1-2
- FIRMWARE_VERSION=2021.11.26.1-3

volumes:
miner-storage:
Expand Down

0 comments on commit 556929d

Please sign in to comment.