File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -327,7 +327,6 @@ jobs:
327327 DATADOG_SITE : datadoghq.com
328328 DD_SERVICE : dd-trace-rb
329329 DD_GIT_REPOSITORY_URL : " ${{ github.repositoryUrl }}"
330- DD_GIT_COMMIT_SHA : " ${{ github.sha }}"
331330 needs :
332331 - build-test-ruby-34
333332 - build-test-ruby-33
@@ -339,6 +338,10 @@ jobs:
339338 pattern : junit-*
340339 merge-multiple : true
341340 - run : sed -i 's;file="./;file=";g' tmp/rspec/*.xml
341+ - if : github.event_name == 'pull_request'
342+ run : ' echo "DD_GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
343+
344+ '
342345 - run : datadog-ci junit upload --verbose tmp/rspec/
343346 coverage :
344347 name : upload/coverage
Original file line number Diff line number Diff line change @@ -302,7 +302,6 @@ namespace :github do
302302 'DATADOG_SITE' => 'datadoghq.com' ,
303303 'DD_SERVICE' => 'dd-trace-rb' ,
304304 'DD_GIT_REPOSITORY_URL' => '${{ github.repositoryUrl }}' ,
305- 'DD_GIT_COMMIT_SHA' => '${{ github.sha }}' ,
306305 }
307306 } ,
308307 'needs' => runtimes . map ( &:build_test_id ) ,
@@ -317,7 +316,15 @@ namespace :github do
317316 }
318317 } ,
319318 { 'run' => "sed -i 's;file=\" \. \/ ;file=\" ;g' tmp/rspec/*.xml" } ,
320- { 'run' => 'datadog-ci junit upload --verbose tmp/rspec/' } ,
319+ {
320+ 'if' => "github.event_name == 'pull_request'" ,
321+ 'run' => <<~BASH
322+ echo "DD_GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
323+ BASH
324+ } ,
325+ {
326+ 'run' => 'datadog-ci junit upload --verbose tmp/rspec/'
327+ } ,
321328 ]
322329 } ,
323330 'coverage' => {
You can’t perform that action at this time.
0 commit comments