File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,10 +34,24 @@ jobs:
3434 path : test-results
3535 pattern : test-results-*
3636
37+ - name : Resolve event file path
38+ id : event_file
39+ shell : pwsh
40+ run : |
41+ $eventFilePath =
42+ Get-ChildItem -Path artifacts -Filter event.json -Recurse |
43+ Select-Object -First 1 -ExpandProperty FullName
44+
45+ if ($null -eq $eventFilePath) {
46+ throw "event.json file was not found in downloaded artifacts"
47+ }
48+
49+ "path=$eventFilePath" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
50+
3751 - name : Publish test results
3852 uses : EnricoMi/publish-unit-test-result-action@v2
3953 with :
4054 commit : ${{ github.event.workflow_run.head_sha }}
41- event_file : artifacts/event.json
55+ event_file : ${{ steps.event_file.outputs.path }}
4256 event_name : ${{ github.event.workflow_run.event }}
4357 files : " test-results/**/*.trx"
Original file line number Diff line number Diff line change 1414 DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
1515 DOTNET_NOLOGO : true
1616
17+ permissions : {}
18+
1719jobs :
1820 event_file :
1921 if : github.event_name == 'pull_request'
2022 name : Publish event file
2123 runs-on : ubuntu-latest
24+ permissions :
25+ contents : read
2226 steps :
2327 - name : Upload event file
2428 uses : actions/upload-artifact@v4
2731 path : ${{ github.event_path }}
2832
2933 build :
34+ permissions :
35+ contents : read
3036
3137 strategy :
3238 fail-fast : false
You can’t perform that action at this time.
0 commit comments