Skip to content

Commit

Permalink
Fix Docker and Package tests (#247)
Browse files Browse the repository at this point in the history
Added better regex matching of file paths. Also remove whitespace from
the path

Signed-off-by: Mike Chang <changml@amazon.com>
  • Loading branch information
amzn-changml authored Feb 9, 2024
1 parent ef2bab8 commit c9a0ee4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c9a0ee4

Please sign in to comment.