Răsfoiți Sursa

Fix Docker and Package tests (#247)

Added better regex matching of file paths. Also remove whitespace from
the path

Signed-off-by: Mike Chang <[email protected]>
Mike Chang 1 an în urmă
părinte
comite
c9a0ee4251
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      .github/workflows/build-package.yaml

+ 2 - 2
.github/workflows/build-package.yaml

@@ -53,8 +53,8 @@ jobs:
                       --exit-code -a --no-prefix -- $FILE | egrep "^\+")
 
             PACKAGE=$(echo $DIFF | cut -d'"' -f2)
-            PACKPATH=$(echo $DIFF | egrep -o "package-system/[^ ]*")
-            DOCKER=$(test -e $PACKPATH/Dockerfile* && echo 1 || echo 0) # Assume the build scripts will use the Dockerfile if found in the package path
+            PACKPATH=$(echo $DIFF | egrep -o "package-system/[^/ ]+(?=/| )" | head -n 1)
+            DOCKER=$(test -e ${PACKPATH%% }/Dockerfile* && echo 1 || echo 0) # Assume the build scripts will use the Dockerfile if found in the package path
             JSONline="{\"package\": \"$PACKAGE\", \"os\": \"$OS_RUNNER\", \"dockerfile\": \"$DOCKER\"},"
             if [[ "$JSON" != *"$JSONline"* ]]; then
               JSON="$JSON$JSONline"