-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathentrypoint.sh
executable file
·34 lines (28 loc) · 984 Bytes
/
entrypoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh -l
set -e
TAINT_ANALYSIS=""
if [ "$INPUT_SECURITY_ANALYSIS" = "true" ]; then
TAINT_ANALYSIS="--taint-analysis"
fi
REPORT=""
if [ ! -z "$INPUT_REPORT_FILE" ]; then
REPORT="--report=$INPUT_REPORT_FILE"
fi
if test -f "composer.json"; then
IGNORE_PLATFORM_REQS=""
if [ "$CHECK_PLATFORM_REQUIREMENTS" = "false" ] || [ "$INPUT_COMPOSER_CHECK_PLATFORM_REQUIREMENTS" = "false" ]; then
IGNORE_PLATFORM_REQS="--ignore-platform-reqs"
fi
NO_DEV="--no-dev"
if [ "$REQUIRE_DEV" = "true" ] || [ "$INPUT_COMPOSER_REQUIRE_DEV" = "true" ]; then
NO_DEV=""
fi
COMPOSER_COMMAND="composer install --no-scripts --no-progress $NO_DEV $IGNORE_PLATFORM_REQS"
echo "::group::$COMPOSER_COMMAND"
$COMPOSER_COMMAND
echo "::endgroup::"
else
echo "composer.json not found in repo, skipping Composer installation"
fi
/composer/vendor/bin/psalm --version
/composer/vendor/bin/psalm --output-format=github $TAINT_ANALYSIS $REPORT $*