Sync from deal-sage/deal-sage@83bb6f4c19
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Install the app's dependencies with the action's install-command, run in the
|
||||
# repo root under bash -eo pipefail like any run step. The output is kept, so a
|
||||
# failure shows its tail on the build page, and a failure closes the build
|
||||
# record (build_failed) instead of leaving the run "running" until it goes
|
||||
# stale. Set up Node.js, the step before, ends here.
|
||||
set -euo pipefail
|
||||
. "$(dirname "$0")/lib.sh"
|
||||
step_next node install
|
||||
cmd="${INSTALL_COMMAND:-npm install --no-audit --no-fund}"
|
||||
|
||||
logf="$(mktemp)"
|
||||
printf '$ %s\n' "$cmd"
|
||||
set +e
|
||||
bash -eo pipefail -c "$cmd" 2>&1 | tee "$logf"
|
||||
rc=${PIPESTATUS[0]}
|
||||
set -e
|
||||
[ "$rc" = 0 ] || fail_build build_failed "Installing dependencies failed (exit code $rc); nothing was published." "$logf"
|
||||
rm -f "$logf"
|
||||
step_done install passed
|
||||
Reference in New Issue
Block a user