Skip to content

Commit

Permalink
Update OpenFleet core files (production)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 24, 2023
1 parent e21d1e7 commit b9200a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/balena-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: BalenaCloud App Deploy

on:
repository_dispatch:
types: [build-open-fleet]
types: [build-balena-app]
workflow_dispatch:

jobs:
Expand All @@ -11,15 +11,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Export short SHA of current commit
- name: Export miner type from repo
run: |
FIRMWARE_SHORT_HASH=$( echo ${GITHUB_SHA:0:7} )
echo "FIRMWARE_SHORT_HASH=$FIRMWARE_SHORT_HASH" >> $GITHUB_ENV
miner="$(echo ${{ github.event.repository.name }} | cut -d '-' -f2-)"
echo "$miner"
echo "miner=$miner" >> $GITHUB_ENV
- name: Random sleep (balena API workaround)
run: sleep $[ ( $RANDOM % 360 ) + 1 ]s
run: sleep $[ ( $RANDOM % 600 ) + 1 ]s
- name: Balena Deploy
uses: nebraltd/[email protected]
with:
Expand Down
17 changes: 14 additions & 3 deletions .github/workflows/build-open-fleet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,19 @@ jobs:
run: |
repo="${{ github.event.repository.name }}"
if grep -q "-rockpi" <<<"$repo"; then
if grep -q "outdoor2" <<<"$repo"; then
echo "Not RasPi 3"
RASPI3="NO"
ROCKPI="YES"
elif grep -q "outdoor" <<<"$repo"; then
elif grep -q "indoor2" <<<"$repo"; then
echo "Not RasPi 3"
RASPI3="NO"
ROCKPI="YES"
elif grep -q "outdoor1" <<<"$repo"; then
echo "RasPi Outdoor"
RASPI3="YES"
ROCKPI="NO"
elif grep -q "indoor" <<<"$repo"; then
elif grep -q "indoor1" <<<"$repo"; then
echo "RasPi Indoor"
RASPI3="YES"
ROCKPI="NO"
Expand Down Expand Up @@ -354,3 +358,10 @@ jobs:
file-path: docker-compose.yml
commit-msg: Update ${{ env.VARIANT }} variant docker compose output (${{ env.BRANCH }})
github-token: ${{ secrets.MR_BUMP }}

- name: Trigger Balena App build action in ${{ github.event.repository.name }} repo
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.MR_BUMP }}
event-type: build-balena-app
repository: ${{ github.event.repository.name }}

0 comments on commit b9200a9

Please sign in to comment.