@@ -12,42 +12,53 @@ jobs:
1212 runs-on : ubuntu-latest
1313
1414 steps :
15+ # Checkout the base branch of this repository with full depth
16+ - name : Checkout this repository
17+ uses : actions/checkout@v4
18+ with :
19+ token : ${{ secrets['GITHUB_TOKEN'] }}
20+ ref : ${{ inputs.base_branch || 'master' }}
21+ fetch-depth : 0
22+
23+ # Set the local git user config to use the GitHub Actions bot account
24+ - name : Set local git config user details
25+ run : |
26+ git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
27+ git config --local user.name "github-actions[bot]"
28+
1529 # Setup some Node stuff
1630 - name : Node.js setup
17- uses : actions/setup-node@v2
31+ uses : actions/setup-node@v4
1832 with :
19- node-version : ' 16 '
33+ node-version : ' 22 '
2034 registry-url : https://registry.npmjs.org/
2135
22- # Set NPM cache options
23- - name : Set NPM cache
24- uses : actions/cache@v2
36+ # Install pnpm
37+ - uses : pnpm/action-setup@v4
38+ name : Install pnpm
2539 with :
26- path : ~/.npm
27- key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28- restore-keys : |
29- ${{ runner.os }}-node-
40+ version : 10
3041
31- # Update NPM to the latest version
32- - name : Update NPM installation
33- run : npm install -g npm@latest
42+ # Gets pnpm's store directory (for next step)
43+ - name : Get pnpm store directory
44+ id : pnpm-cache
45+ shell : bash
46+ run : |
47+ echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
3448
35- # Checkout
36- - name : Checkout this repository
37- uses : actions/checkout@v2
49+ # Set pnpm cache options
50+ - uses : actions/cache@v4
51+ name : Setup pnpm cache
3852 with :
39- ref : master
40- fetch-depth : 0
53+ path : ${{ steps.pnpm-cache.outputs.STORE_PATH }}
54+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
55+ restore-keys : |
56+ ${{ runner.os }}-pnpm-store-
4157
42- # Set the local git user config to use the GitHub Actions bot account
43- - name : Set local git config user details
58+ # Install pnpm dependencies
59+ - name : Install pnpm dependencies
4460 run : |
45- git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
46- git config --local user.name "github-actions[bot]"
47-
48- # Install NPM dependencies
49- - name : Install NPM dependencies
50- run : npm ci
61+ pnpm i --frozen-lockfile
5162
5263 # Run the definition validation script
5364 - name : Validate definitions
0 commit comments