-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
77 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM python:3-alpine | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
RUN \ | ||
apk add --no-cache \ | ||
python3-dev \ | ||
bash \ | ||
git \ | ||
gcc \ | ||
libc-dev \ | ||
libffi-dev \ | ||
openssl-dev \ | ||
\ | ||
&& rm -rf /var/cache/apk/* \ | ||
\ | ||
&& git clone --depth 1 https://github.com/home-assistant/core.git /core \ | ||
\ | ||
&& python3 -m pip install --no-cache-dir -e /core \ | ||
\ | ||
&& chmod +x /entrypoint.sh | ||
|
||
WORKDIR "/github/workspace" | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
LABEL "name"="hassfest" | ||
LABEL "maintainer"="Home Assistant <[email protected]>" | ||
LABEL "version"="1.0" | ||
|
||
LABEL "com.github.actions.name"="hassfest" | ||
LABEL "com.github.actions.description"="Run hassfest to validate standalone integration repositories" | ||
LABEL "com.github.actions.icon"="terminal" | ||
LABEL "com.github.actions.color"="gray-dark" |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
declare -a INTEGRATIONS | ||
|
||
for manifestfile in $(find $GITHUB_WORKSPACE -type f -name manifest.json); do | ||
INTEGRATIONS+=(--integration-path) | ||
INTEGRATIONS+=("$(dirname -- ${manifestfile})") | ||
done | ||
|
||
if [ "${INTEGRATIONS}" = "" ]; then | ||
echo "No integrations found!" | ||
exit 1 | ||
fi | ||
echo "${INTEGRATIONS[@]}" | ||
python3 -m script.hassfest --action validate "${INTEGRATIONS[@]}" |