@@ -56,19 +56,27 @@ jobs:
5656 name : Build wheel and source distribution
5757 runs-on : ubuntu-latest
5858 needs : define-tags
59-
59+ permissions :
60+ # needed for dd-sts
61+ id-token : write
6062 steps :
6163 - name : Checkout code
6264 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6365 with :
6466 fetch-depth : 0
6567
68+ - name : Get Datadog credentials
69+ id : dd-sts
70+ uses : DataDog/dd-sts-action@2e8187910199bd93129520183c093e19aa585c75 # v1.0.0
71+ with :
72+ policy : integrations-core-api-key
73+
6674 - name : Tag Job
6775 uses : ./.github/actions/tag-job
6876 if : ${{ github.event.pull_request.head.repo.fork != true }}
6977 with :
7078 tags : ' ${{ needs.define-tags.outputs.base_tags }},step:build-artifacts'
71- dd_api_key : ${{ secrets.DD_API_KEY }}
79+ dd_api_key : ${{ steps.dd-sts.outputs.api_key }}
7280
7381 - name : Install build frontend
7482 run : python -m pip install --upgrade build
8997 - define-tags
9098 - python-artifacts
9199 runs-on : ${{ matrix.job.os }}
100+ permissions :
101+ # needed for dd-sts
102+ id-token : write
92103 strategy :
93104 fail-fast : false
94105 matrix :
@@ -133,12 +144,18 @@ jobs:
133144 with :
134145 fetch-depth : 0
135146
147+ - name : Get Datadog credentials
148+ id : dd-sts
149+ uses : DataDog/dd-sts-action@2e8187910199bd93129520183c093e19aa585c75 # v1.0.0
150+ with :
151+ policy : integrations-core-api-key
152+
136153 - name : Tag Job
137154 uses : ./.github/actions/tag-job
138155 if : ${{ github.event.pull_request.head.repo.fork != true }}
139156 with :
140157 tags : ' ${{ needs.define-tags.outputs.base_tags }},step:build-binary,os:${{ matrix.job.os }},target:${{ matrix.job.target }}'
141- dd_api_key : ${{ secrets.DD_API_KEY }}
158+ dd_api_key : ${{ steps.dd-sts.outputs.api_key }}
142159
143160 - name : Fetch PyApp
144161 run : >-
@@ -303,20 +320,27 @@ jobs:
303320 - define-tags
304321 - binaries
305322 runs-on : windows-2022
306-
323+ permissions :
324+ # needed for dd-sts
325+ id-token : write
307326 env :
308327 VERSION : ${{ needs.binaries.outputs.version }}
309328
310329 steps :
311330 - name : Checkout code
312331 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
332+ - name : Get Datadog credentials
333+ id : dd-sts
334+ uses : DataDog/dd-sts-action@2e8187910199bd93129520183c093e19aa585c75 # v1.0.0
335+ with :
336+ policy : integrations-core-api-key
313337
314338 - name : Tag Job
315339 uses : ./.github/actions/tag-job
316340 if : ${{ github.event.pull_request.head.repo.fork != true }}
317341 with :
318342 tags : ' ${{ needs.define-tags.outputs.base_tags }},step:package-windows,os:windows'
319- dd_api_key : ${{ secrets.DD_API_KEY }}
343+ dd_api_key : ${{ steps.dd-sts.outputs.api_key }}
320344
321345 - name : Set up Python ${{ env.PYTHON_VERSION }}
322346 uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -418,20 +442,28 @@ jobs:
418442 - define-tags
419443 - binaries
420444 runs-on : macos-14-large
421-
445+ permissions :
446+ # needed for dd-sts
447+ id-token : write
422448 env :
423449 VERSION : ${{ needs.binaries.outputs.version }}
424450
425451 steps :
426452 - name : Checkout code
427453 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
428454
455+ - name : Get Datadog credentials
456+ id : dd-sts
457+ uses : DataDog/dd-sts-action@2e8187910199bd93129520183c093e19aa585c75 # v1.0.0
458+ with :
459+ policy : integrations-core-api-key
460+
429461 - name : Tag Job
430462 uses : ./.github/actions/tag-job
431463 if : ${{ github.event.pull_request.head.repo.fork != true }}
432464 with :
433465 tags : ' ${{ needs.define-tags.outputs.base_tags }},step:package-macos,os:macos'
434- dd_api_key : ${{ secrets.DD_API_KEY }}
466+ dd_api_key : ${{ steps.dd-sts.outputs.api_key }}
435467
436468 - name : Set up Python ${{ env.PYTHON_VERSION }}
437469 uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -659,12 +691,18 @@ jobs:
659691 - name : Checkout code
660692 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
661693
694+ - name : Get Datadog credentials
695+ id : dd-sts
696+ uses : DataDog/dd-sts-action@2e8187910199bd93129520183c093e19aa585c75 # v1.0.0
697+ with :
698+ policy : integrations-core-api-key
699+
662700 - name : Tag Job
663701 uses : ./.github/actions/tag-job
664702 if : ${{ github.event.pull_request.head.repo.fork != true }}
665703 with :
666704 tags : ' ${{ needs.define-tags.outputs.base_tags }},step:publish'
667- dd_api_key : ${{ secrets.DD_API_KEY }}
705+ dd_api_key : ${{ steps.dd-sts.outputs.api_key }}
668706
669707 - name : Download Python artifacts
670708 uses : actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
0 commit comments