@@ -32,21 +32,23 @@ jobs:
3232 os : [ 'ubuntu-22.04', 'windows-latest' ] 
3333 steps :
3434 - name : Checkout code 
35-  uses : actions/checkout@v3 
35+  uses : actions/checkout@v4 
36+  with :
37+  ref : ${{ github.event.pull_request.head.sha }} 
3638 - name : Cache Gradle dependencies 
37-  uses : actions/cache@v3  
39+  uses : actions/cache@v4  
3840 with :
3941 path : ~/.gradle/caches 
4042 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} 
4143 restore-keys : | 
4244 ${{ runner.os }}-gradle- 
4345name : Cache Gradle wrappers 
44-  uses : actions/cache@v3  
46+  uses : actions/cache@v4  
4547 with :
4648 path : ~/.gradle/wrapper 
4749 key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} 
4850 - name : Setup java 
49-  uses : actions/setup-java@v3  
51+  uses : actions/setup-java@v4  
5052 with :
5153 distribution : ' zulu' 
5254 java-version : ${{ matrix.java }} 
5658 echo "BUILD_JAVA_HOME=${JAVA_HOME}" >> $GITHUB_ENV 
5759 echo "BUILD_JAVA_VERSION=${{ matrix.java }}" >> $GITHUB_ENV 
5860name : Setup java 8 to run the Gradle script 
59-  uses : actions/setup-java@v3  
61+  uses : actions/setup-java@v4  
6062 with :
6163 distribution : ' zulu' 
6264 java-version : 8 
@@ -75,21 +77,23 @@ jobs:
7577 DOTNET_CLI_TELEMETRY_OPTOUT : 1 
7678 steps :
7779 - name : Checkout code 
78-  uses : actions/checkout@v3 
80+  uses : actions/checkout@v4 
81+  with :
82+  ref : ${{ github.event.pull_request.head.sha }} 
7983 - name : Cache Gradle dependencies 
80-  uses : actions/cache@v3  
84+  uses : actions/cache@v4  
8185 with :
8286 path : ~/.gradle/caches 
8387 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} 
8488 restore-keys : | 
8589 ${{ runner.os }}-gradle- 
8690name : Cache Gradle wrappers 
87-  uses : actions/cache@v3  
91+  uses : actions/cache@v4  
8892 with :
8993 path : ~/.gradle/wrapper 
9094 key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} 
9195 - name : Cache NuGet dependencies 
92-  uses : actions/cache@v3  
96+  uses : actions/cache@v4  
9397 with :
9498 path : ~/.nuget/packages 
9599 key : ${{ runner.os }}-nuget-${{ hashFiles('csharp/**/*.sln') }} 
@@ -118,16 +122,18 @@ jobs:
118122 CXX : g++-${{ matrix.version }} 
119123 steps :
120124 - name : Checkout code 
121-  uses : actions/checkout@v3 
125+  uses : actions/checkout@v4 
126+  with :
127+  ref : ${{ github.event.pull_request.head.sha }} 
122128 - name : Cache Gradle dependencies 
123-  uses : actions/cache@v3  
129+  uses : actions/cache@v4  
124130 with :
125131 path : ~/.gradle/caches 
126132 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} 
127133 restore-keys : | 
128134 ${{ runner.os }}-gradle- 
129135name : Cache Gradle wrappers 
130-  uses : actions/cache@v3  
136+  uses : actions/cache@v4  
131137 with :
132138 path : ~/.gradle/wrapper 
133139 key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} 
@@ -153,16 +159,18 @@ jobs:
153159 CXX : g++-${{ matrix.version }} 
154160 steps :
155161 - name : Checkout code 
156-  uses : actions/checkout@v3 
162+  uses : actions/checkout@v4 
163+  with :
164+  ref : ${{ github.event.pull_request.head.sha }} 
157165 - name : Cache Gradle dependencies 
158-  uses : actions/cache@v3  
166+  uses : actions/cache@v4  
159167 with :
160168 path : ~/.gradle/caches 
161169 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} 
162170 restore-keys : | 
163171 ${{ runner.os }}-gradle- 
164172name : Cache Gradle wrappers 
165-  uses : actions/cache@v3  
173+  uses : actions/cache@v4  
166174 with :
167175 path : ~/.gradle/wrapper 
168176 key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} 
@@ -189,16 +197,18 @@ jobs:
189197 CXX : clang++-${{ matrix.version }} 
190198 steps :
191199 - name : Checkout code 
192-  uses : actions/checkout@v3 
200+  uses : actions/checkout@v4 
201+  with :
202+  ref : ${{ github.event.pull_request.head.sha }} 
193203 - name : Cache Gradle dependencies 
194-  uses : actions/cache@v3  
204+  uses : actions/cache@v4  
195205 with :
196206 path : ~/.gradle/caches 
197207 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} 
198208 restore-keys : | 
199209 ${{ runner.os }}-gradle- 
200210name : Cache Gradle wrappers 
201-  uses : actions/cache@v3  
211+  uses : actions/cache@v4  
202212 with :
203213 path : ~/.gradle/wrapper 
204214 key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} 
@@ -227,16 +237,18 @@ jobs:
227237 CXX : clang++-${{ matrix.version }} 
228238 steps :
229239 - name : Checkout code 
230-  uses : actions/checkout@v3 
240+  uses : actions/checkout@v4 
241+  with :
242+  ref : ${{ github.event.pull_request.head.sha }} 
231243 - name : Cache Gradle dependencies 
232-  uses : actions/cache@v3  
244+  uses : actions/cache@v4  
233245 with :
234246 path : ~/.gradle/caches 
235247 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} 
236248 restore-keys : | 
237249 ${{ runner.os }}-gradle- 
238250name : Cache Gradle wrappers 
239-  uses : actions/cache@v3  
251+  uses : actions/cache@v4  
240252 with :
241253 path : ~/.gradle/wrapper 
242254 key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} 
@@ -265,7 +277,9 @@ jobs:
265277 CXX : clang++ 
266278 steps :
267279 - name : Checkout code 
268-  uses : actions/checkout@v3 
280+  uses : actions/checkout@v4 
281+  with :
282+  ref : ${{ github.event.pull_request.head.sha }} 
269283 - name : Install CMake 
270284 run : | 
271285 curl -O -L https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz 
@@ -286,7 +300,9 @@ jobs:
286300 CXX : cl 
287301 steps :
288302 - name : Checkout code 
289-  uses : actions/checkout@v3 
303+  uses : actions/checkout@v4 
304+  with :
305+  ref : ${{ github.event.pull_request.head.sha }} 
290306 - name : Install CMake 
291307 run : | 
292308 $client = new-object System.Net.WebClient 
@@ -305,16 +321,18 @@ jobs:
305321 rust : [ stable, beta, nightly ] 
306322 steps :
307323 - name : Checkout code 
308-  uses : actions/checkout@v3 
324+  uses : actions/checkout@v4 
325+  with :
326+  ref : ${{ github.event.pull_request.head.sha }} 
309327 - name : Cache Gradle dependencies 
310-  uses : actions/cache@v3  
328+  uses : actions/cache@v4  
311329 with :
312330 path : ~/.gradle/caches 
313331 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} 
314332 restore-keys : | 
315333 ${{ runner.os }}-gradle- 
316334name : Cache Gradle wrappers 
317-  uses : actions/cache@v3  
335+  uses : actions/cache@v4  
318336 with :
319337 path : ~/.gradle/wrapper 
320338 key : ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} 
0 commit comments