File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 runs-on : cx-public-ubuntu-x64
1010 steps :
1111 - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
12+ - name : Verify single lockfile (Step 0 - Supply Chain Policy)
13+ run : |
14+ if [ -f yarn.lock ] && [ -f package-lock.json ]; then
15+ echo "❌ ERROR: Both yarn.lock and package-lock.json found. Policy requires exactly ONE package manager. Allowed: npm + package-lock.json OR Yarn + yarn.lock"
16+ exit 1
17+ fi
18+ if [ ! -f yarn.lock ] && [ ! -f package-lock.json ]; then
19+ echo "❌ ERROR: No lockfile found. Policy requires exactly ONE package manager lockfile. Required: npm + package-lock.json OR Yarn + yarn.lock"
20+ exit 1
21+ fi
1222 - name : Use Node.js 22.11.0
1323 uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
1424 with :
2232 runs-on : cx-public-ubuntu-x64
2333 steps :
2434 - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
35+ - name : Verify single lockfile (Step 0 - Supply Chain Policy)
36+ run : |
37+ if [ -f yarn.lock ] && [ -f package-lock.json ]; then
38+ echo "❌ ERROR: Both yarn.lock and package-lock.json found. Policy requires exactly ONE package manager. Allowed: npm + package-lock.json OR Yarn + yarn.lock"
39+ exit 1
40+ fi
41+ if [ ! -f yarn.lock ] && [ ! -f package-lock.json ]; then
42+ echo "❌ ERROR: No lockfile found. Policy requires exactly ONE package manager lockfile. Required: npm + package-lock.json OR Yarn + yarn.lock"
43+ exit 1
44+ fi
2545 - name : Use Node.js 22.11.0
2646 uses : actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
2747 with :
Original file line number Diff line number Diff line change 7474 with :
7575 fetch-depth : 0
7676
77- - name : Git Configuration
77+ - name : Verify single lockfile (Step 0 - Supply Chain Policy)
78+ run : |
79+ if [ -f yarn.lock ] && [ -f package-lock.json ]; then
80+ echo "❌ ERROR: Both yarn.lock and package-lock.json found. Policy requires exactly ONE package manager. Allowed: npm + package-lock.json OR Yarn + yarn.lock"
81+ exit 1
82+ fi
83+ if [ ! -f yarn.lock ] && [ ! -f package-lock.json ]; then
84+ echo "❌ ERROR: No lockfile found. Policy requires exactly ONE package manager lockfile. Required: npm + package-lock.json OR Yarn + yarn.lock"
85+ exit 1
86+ fi
87+ - name : Git Configuration
7888 run : |
7989 git config user.name github-actions
8090 git config user.email github-actions@github.com
You can’t perform that action at this time.
0 commit comments