Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.github/workflows/deploy-template.yml: Add deployment for ODROID H4 #564

Open
wants to merge 7 commits into
base: dasharo
Choose a base branch
from
38 changes: 17 additions & 21 deletions .github/workflows/deploy-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,24 @@ jobs:
- name: Parse directories
id: parse_directories
run: |

tag=${{ steps.tag_name.outputs.tag }}
if [ "${{ inputs.platform }}" == "protectli" ]; then
base_dir="protectli"
model=$(echo "$tag" | cut -d'_' -f1-3)
release=$(echo "$tag" | cut -d'_' -f4)
elif [ "${{ inputs.platform }}" == "novacustom" ]; then
base_dir="novacustom"
model=$(echo "$tag" | cut -d'_' -f1-3)
release=$(echo "$tag" | cut -d'_' -f4)
elif [ "${{ inputs.platform }}" == "pcengines" ]; then
base_dir="pcengines"
model="pcengines_apu2"
release=$(echo "$tag" | cut -d'_' -f3)
elif [ "${{ inputs.platform }}" == "msi" ]; then
base_dir="3mdeb/msi_$(echo "$tag" | cut -d'_' -f1-2)"
model=""
release=$(echo "$tag" | cut -d'_' -f3)
elif [ "${{ inputs.platform }}" == "hardkernel" ]; then
base_dir="3mdeb/hardkernel_$(echo "$tag" | cut -d'_' -f2-3)"
model=""
release=$(echo "$tag" | cut -d'_' -f4)
fi
# Extract platform model string (everything before the last underscore in the tag)
model=$(echo "$tag" | awk -F'_' '{OFS="_"; $(NF)=""; print $0}' | sed 's/_$//')
# Extract version string (everything after the last underscore in the tag)
release=$(echo "$tag" | awk -F'_' '{print $NF}')

# Use 3mdeb directory for community / DPP releases
case "${{ inputs.platform }}" in
msi|hardkernel)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theoretically also dell and intel minnowboard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BUt instead of having to update this file for each new board, we could give another input param to set whether it is community/dpp or not. Then only build.yml will be updated

base_dir="3mdeb"
;;
*)
# by default, use platform vendor name as a directory
base_dir="${{ inputs.platform }}"
;;
esac

echo "base_dir=$base_dir" >> "$GITHUB_OUTPUT"
echo "model=$model" >> "$GITHUB_OUTPUT"
echo "release=$release" >> "$GITHUB_OUTPUT"
Expand Down