File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,19 +41,22 @@ jobs:
4141 cache : true
4242
4343 - name : Get Datadog credentials
44+ if : github.ref == 'refs/heads/main'
4445 id : dd-sts # Needed to be able to reference this step's output later
4546 uses : DataDog/dd-sts-action@main # Pin to the main branch to get auto updates for free, or to a specific commit hash if you want stability
4647 with :
4748 policy : public-datadog-pup-sts
4849
4950 - name : Configure Datadog Test Optimization
51+ if : github.ref == 'refs/heads/main'
5052 uses : datadog/test-visibility-github-action@v2
5153 with :
5254 languages : go
5355 api_key : ${{ steps.dd-sts.outputs.api_key }}
5456 site : datadoghq.com
5557
5658 - name : Install Datadog CI tools
59+ if : github.ref == 'refs/heads/main'
5760 run : |
5861 # Install orchestrion for Go test instrumentation
5962 go install github.com/DataDog/orchestrion@latest
@@ -117,7 +120,7 @@ jobs:
117120 go tool cover -func=coverage.out | tail -1 >> coverage_report.txt
118121
119122 - name : Upload coverage to Datadog
120- if : env.DD_API_KEY != ' '
123+ if : github.ref == 'refs/heads/main '
121124 env :
122125 DATADOG_API_KEY : ${{ steps.dd-sts.outputs.api_key }}
123126 DD_SITE : datadoghq.com
You can’t perform that action at this time.
0 commit comments