File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -17,14 +17,16 @@ function checkCondition () {
17
17
function checkRun () {
18
18
repoPath=$( cat " $GITHUB_ACTION_PATH " /data/path)
19
19
mkdir -p " $repoPath /requirements"
20
- wget -q -O " $GITHUB_ACTION_PATH /helpers/requirements/validate_requirements.py" \
21
- https://raw.githubusercontent.com/home-assistant/wheels-custom-integrations/master/scripts/validate_requirements.py
22
- cd " $GITHUB_ACTION_PATH /helpers/requirements"
23
- jq -r .requirements " $GITHUB_ACTION_PATH /data/manifest.json" > ./requirements.json
20
+ git clone --depth 1 https://github.com/home-assistant/wheels-custom-integrations.git " $repoPath /wheels-custom-integrations"
21
+ cd " $repoPath /wheels-custom-integrations"
22
+ jq -r .requirements " $GITHUB_ACTION_PATH /data/manifest.json" > " $repoPath /wheels-custom-integrations/validate_requirements/requirements.json"
24
23
jq . ./requirements.json
25
- docker build . -t homeassistant/home-assistant:beta
24
+ cp " $GITHUB_ACTION_PATH /helpers/requirements/__init__.py" " $repoPath /wheels-custom-integrations/validate_requirements"
25
+ cp " $GITHUB_ACTION_PATH /helpers/requirements/run.sh" " $repoPath /wheels-custom-integrations/validate_requirements"
26
+ touch " $repoPath /wheels-custom-integrations/validate_requirements/files.json"
27
+ docker build -t validate -f validate_requirements/Dockerfile .
26
28
set +e
27
- docker run homeassistant/home-assistant:beta
29
+ docker run --rm validate
28
30
requirements=" $? "
29
31
set -e
30
32
if [ " ${requirements} " == 0 ]; then
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def validate() -> bool:
15
15
print ()
16
16
piped_input = sys .stdin .read ()
17
17
requirements = []
18
- with open ("/entry/requirements /requirements.json" , "r" ) as requirements_file :
18
+ with open ("/action/validate /requirements.json" , "r" ) as requirements_file :
19
19
requirements = json .loads (requirements_file .read ())
20
20
validated_ok = True
21
21
print ("Requirements to validate:" , len (requirements ))
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ mkdir -p /action
4
+ mv /validate /action/validate
5
+ cd /action || exit 1
6
+ python3 -m validate
You can’t perform that action at this time.
0 commit comments