-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplify deploy actions Relates-to: #694
- Loading branch information
Showing
4 changed files
with
30 additions
and
356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
variant: [nebra-indoor1, nebra-outdoor1, nebra-indoor2, nebra-outdoor2] # TODO add nebra-light2 later | ||
sbc: [nebra-indoor1, nebra-outdoor1, nebra-indoor2, nebra-outdoor2, rak, pisces, og, sensecap, finestra, controllino, cotx, pantherx1, linxdot, linxdot-rkcm3, pycom, syncrobit, syncrobit-rkcm3, risinghf, midas] | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -21,6 +21,7 @@ jobs: | |
run: pip install -r requirements.txt | ||
|
||
- name: Export short SHA of current commit | ||
shell: bash | ||
run: | | ||
FIRMWARE_SHORT_HASH=$( echo ${GITHUB_SHA:0:7} ) | ||
echo "FIRMWARE_SHORT_HASH=$FIRMWARE_SHORT_HASH" >> $GITHUB_ENV | ||
|
@@ -40,13 +41,24 @@ jobs: | |
|
||
- name: Generate Docker Compose | ||
run: | | ||
repo="helium-${{matrix.variant}}" | ||
miner="${{ matrix.sbc }}" | ||
repo="helium-$miner" | ||
if [[ "$miner" == "nebra-indoor1" ]] || [[ "$miner" == "nebra-indoor2" ]] || [[ "$miner" == "nebra-outdoor1" ]] || [[ "$miner" == "nebra-outdoor2" ]] ; then | ||
variant="$miner" | ||
elif [[ "$miner" == "og" ]] ; then | ||
variant="helium-fl1" | ||
else | ||
variant="$miner-fl1" | ||
fi | ||
echo "Variant: $variant" | ||
echo "REPO=$repo" >> $GITHUB_ENV | ||
echo "Repo: $repo" | ||
FIRMWARE_SHORT_HASH=${{ env.FIRMWARE_SHORT_HASH }} | ||
python gen_docker_compose_by_variant.py ${{matrix.variant}} -o docker-compose.yml | ||
python gen_docker_compose_by_variant.py "$variant" -o docker-compose.yml | ||
- name: Balena Deploy | ||
uses: nebraltd/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
variant: [nebra-indoor1, nebra-outdoor1, nebra-indoor2, nebra-outdoor2] # TODO add nebra-light2 later | ||
sbc: [nebra-indoor1, nebra-outdoor1, nebra-indoor2, nebra-outdoor2, rak, pisces, og, sensecap, finestra, controllino, cotx, pantherx1, linxdot, linxdot-rkcm3, pycom, syncrobit, syncrobit-rkcm3, risinghf, midas] | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -27,6 +27,7 @@ jobs: | |
run: pip install -r requirements.txt | ||
|
||
- name: Export short SHA of current commit | ||
shell: bash | ||
run: | | ||
FIRMWARE_SHORT_HASH=$( echo ${GITHUB_SHA:0:7} ) | ||
echo "FIRMWARE_SHORT_HASH=$FIRMWARE_SHORT_HASH" >> $GITHUB_ENV | ||
|
@@ -46,13 +47,24 @@ jobs: | |
|
||
- name: Generate Docker Compose | ||
run: | | ||
repo="helium-${{matrix.variant}}" | ||
miner="${{ matrix.sbc }}" | ||
repo="helium-$miner" | ||
if [[ "$miner" == "nebra-indoor1" ]] || [[ "$miner" == "nebra-indoor2" ]] || [[ "$miner" == "nebra-outdoor1" ]] || [[ "$miner" == "nebra-outdoor2" ]] ; then | ||
variant="$miner" | ||
elif [[ "$miner" == "og" ]] ; then | ||
variant="helium-fl1" | ||
else | ||
variant="$miner-fl1" | ||
fi | ||
echo "Variant: $variant" | ||
echo "REPO=$repo" >> $GITHUB_ENV | ||
echo "Repo: $repo" | ||
FIRMWARE_SHORT_HASH=${{ env.FIRMWARE_SHORT_HASH }} | ||
python gen_docker_compose_by_variant.py ${{matrix.variant}} -o docker-compose.yml | ||
python gen_docker_compose_by_variant.py "$variant" -o docker-compose.yml | ||
- name: Balena Deploy | ||
uses: nebraltd/[email protected] | ||
|
172 changes: 0 additions & 172 deletions
172
.github/workflows/push-to-prod-old-fleets-nebraos-cloud-draft.yml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.