diff --git a/.github/workflows/push-to-prod-draft.yml b/.github/workflows/push-to-prod-draft.yml index 9cf44467..bb883185 100644 --- a/.github/workflows/push-to-prod-draft.yml +++ b/.github/workflows/push-to-prod-draft.yml @@ -25,12 +25,18 @@ jobs: 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 + - name: Balena Deploy (ROCK Pi) + if: matrix.sbc == 'rockpi' && success() uses: nebraltd/balena-cli-action@v12.54.5 - if: success() with: balena_api_token: ${{secrets.BALENA_API_TOKEN}} balena_command: "deploy nebraltd/helium-${{ matrix.variant }}-${{ matrix.frequency }}${{ env.ROCKPI }} --logs --debug --nocache --build --draft" + - name: Balena Deploy (RasPi) + if: matrix.sbc == 'raspi' && success() + uses: nebraltd/balena-cli-action@v12.54.5 + with: + balena_api_token: ${{secrets.BALENA_API_TOKEN_1}} + balena_command: "deploy nebraltd/helium-${{ matrix.variant }}-${{ matrix.frequency }} --logs --debug --nocache --build --draft" open-fleet: runs-on: ubuntu-latest @@ -45,7 +51,7 @@ jobs: uses: nebraltd/balena-cli-action@v12.54.5 if: success() with: - balena_api_token: ${{secrets.BALENA_API_TOKEN}} + balena_api_token: ${{secrets.BALENA_API_TOKEN_2}} balena_command: "deploy nebraltd/helium-miner --logs --debug --nocache --build --draft" commercial: @@ -61,5 +67,5 @@ jobs: uses: nebraltd/balena-cli-action@v12.54.5 if: success() with: - balena_api_token: ${{secrets.BALENA_API_TOKEN}} + balena_api_token: ${{secrets.BALENA_API_TOKEN_3}} balena_command: "deploy nebraltd/helium-miner-commercial --logs --debug --nocache --build --draft" diff --git a/.github/workflows/push-to-prod.yml b/.github/workflows/push-to-prod.yml index 5f343b10..2e838814 100644 --- a/.github/workflows/push-to-prod.yml +++ b/.github/workflows/push-to-prod.yml @@ -26,12 +26,18 @@ jobs: 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 + - name: Balena Deploy (ROCK Pi) uses: nebraltd/balena-cli-action@v12.54.5 - if: success() + if: matrix.sbc == 'rockpi' && success() with: balena_api_token: ${{secrets.BALENA_API_TOKEN}} balena_command: "deploy nebraltd/helium-${{ matrix.variant }}-${{ matrix.frequency }}${{ env.ROCKPI }} --logs --debug --nocache --build" + - name: Balena Deploy (RasPi) + uses: nebraltd/balena-cli-action@v12.54.5 + if: matrix.sbc == 'raspi' && success() + with: + balena_api_token: ${{secrets.BALENA_API_TOKEN_1}} + balena_command: "deploy nebraltd/helium-${{ matrix.variant }}-${{ matrix.frequency }} --logs --debug --nocache --build" open-fleet: runs-on: ubuntu-latest @@ -44,7 +50,7 @@ jobs: uses: nebraltd/balena-cli-action@v12.54.5 if: success() with: - balena_api_token: ${{secrets.BALENA_API_TOKEN}} + balena_api_token: ${{secrets.BALENA_API_TOKEN_2}} balena_command: "deploy nebraltd/helium-miner --logs --debug --nocache --build" commercial: @@ -58,5 +64,5 @@ jobs: uses: nebraltd/balena-cli-action@v12.54.5 if: success() with: - balena_api_token: ${{secrets.BALENA_API_TOKEN}} + balena_api_token: ${{secrets.BALENA_API_TOKEN_3}} balena_command: "deploy nebraltd/helium-miner-commercial --logs --debug --nocache --build" diff --git a/.github/workflows/push-to-testnet-draft.yml b/.github/workflows/push-to-testnet-draft.yml index dcf6a011..f215952d 100644 --- a/.github/workflows/push-to-testnet-draft.yml +++ b/.github/workflows/push-to-testnet-draft.yml @@ -13,15 +13,23 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Random sleep (balena API workaround) + run: sleep $[ ( $RANDOM % 180 ) + 1 ]s - 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 + - name: Balena Deploy (ROCK Pi) uses: nebraltd/balena-cli-action@v12.54.5 - if: success() + if: matrix.sbc == 'rockpi' && success() with: balena_api_token: ${{secrets.BALENA_API_TOKEN}} balena_command: "deploy nebraltd/helium-testnet${{ env.ROCKPI }} --logs --debug --nocache --build --draft" + - name: Balena Deploy (RasPi) + uses: nebraltd/balena-cli-action@v12.54.5 + if: matrix.sbc == 'raspi' && success() + with: + balena_api_token: ${{secrets.BALENA_API_TOKEN_1}} + balena_command: "deploy nebraltd/helium-testnet --logs --debug --nocache --build --draft" diff --git a/.github/workflows/push-to-testnet.yml b/.github/workflows/push-to-testnet.yml index 8b88814a..83a432e0 100644 --- a/.github/workflows/push-to-testnet.yml +++ b/.github/workflows/push-to-testnet.yml @@ -16,15 +16,23 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - name: Random sleep (balena API workaround) + run: sleep $[ ( $RANDOM % 180 ) + 1 ]s - 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 + - name: Balena Deploy (ROCK Pi) uses: nebraltd/balena-cli-action@v12.54.5 - if: success() + if: matrix.sbc == 'rockpi' && success() with: balena_api_token: ${{secrets.BALENA_API_TOKEN}} balena_command: "deploy nebraltd/helium-testnet${{ env.ROCKPI }} --logs --debug --nocache --build" + - name: Balena Deploy (RasPi) + uses: nebraltd/balena-cli-action@v12.54.5 + if: matrix.sbc == 'raspi' && success() + with: + balena_api_token: ${{secrets.BALENA_API_TOKEN_1}} + balena_command: "deploy nebraltd/helium-testnet --logs --debug --nocache --build"