Skip to content

Commit 75d7a14

Browse files
committed
WIP
1 parent 0b715dd commit 75d7a14

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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

tasks/github.rake

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff 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' => {

0 commit comments

Comments
 (0)