GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Merge pull request #3155 from github/mbg/node/no-install-in-actions · github/codeql-action@94a9b7a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • scripts
    • check-node-modules.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎scripts/check-node-modules.sh‎

Copy file name to clipboard
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#!/bin/bash
2+
23
set -e
34

5+
# Check if running in GitHub Actions
6+
if [ "$GITHUB_ACTIONS" = "true" ]; then
7+
echo "Running in a GitHub Actions workflow; not running 'npm install'"
8+
exit 0
9+
fi
10+
411
# Check if npm install is likely needed before proceeding
512
if [ ! -d node_modules ] || [ package-lock.json -nt node_modules/.package-lock.json ]; then
13+
echo "Running 'npm install' because 'node_modules/.package-lock.json' appears to be outdated..."
614
npm install
15+
else
16+
echo "Skipping 'npm install' because 'node_modules/.package-lock.json' appears to be up-to-date."
717
fi

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.