Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Fix add-on build (home-assistant#1647)
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus authored Oct 25, 2020
1 parent 8b7dc6d commit abfefec
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ jobs:
- name: Get add-ons
id: addons
run: |
addons=$(find ./ -name config.json | cut -d "/" -f2 | sort -u)
echo "::set-output name=addons::$addons"
declare -a addons
for addon in $(find ./ -name config.json | cut -d "/" -f2 | sort -u); do
addons+=("$addon");
done
echo "::set-output name=addons::${addons[@]}"
- name: Get changed add-ons
id: changed_addons
Expand All @@ -47,12 +50,12 @@ jobs:
done
changed=$(echo ${changed_addons[@]} | rev | cut -c 2- | rev)
echo "::set-output name=addons::[$changed]"
if [[ ! -z ${changed} ]]; then
echo "Changed add-ons: $changed"
echo "::set-output name=changed::true"
if [[ -n ${changed} ]]; then
echo "Changed add-ons: $changed";
echo "::set-output name=changed::true";
echo "::set-output name=addons::[$changed]";
else
echo "No add-on had any monitored files changed (${{ env.MONITORED_FILES }})"
echo "No add-on had any monitored files changed (${{ env.MONITORED_FILES }})";
fi
build:
Expand Down Expand Up @@ -81,7 +84,7 @@ jobs:
if [[ "${{ steps.info.outputs.architectures }}" =~ ${{ matrix.arch }} ]]; then
echo "::set-output name=buld_arch::true";
else
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build"
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build";
fi

- name: Set build arguments
Expand Down

0 comments on commit abfefec

Please sign in to comment.