Skip to content

Commit

Permalink
fix: add multiple API tokens for balena
Browse files Browse the repository at this point in the history
add multiple balena API tokens to avoid rate limiting

Relates-to: #293 
Relates-to: #299 
Relates-to: #300
  • Loading branch information
shawaj authored Dec 7, 2021
1 parent 024cd80 commit 6e9453e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/push-to-prod-draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,21 @@ 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'
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'
uses: nebraltd/balena-cli-action@v12.54.5
if: success()
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
Expand All @@ -45,7 +54,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:
Expand All @@ -61,5 +70,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"

0 comments on commit 6e9453e

Please sign in to comment.