Skip to content

Commit 85b6c70

Browse files
authored
[SINT-4729] use dd-octo-sts in approved_status (#3483)
1 parent 75a11b2 commit 85b6c70

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/approved_status.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Send PR Approval Status
22

3-
permissions:
4-
contents: read
5-
checks: write
6-
73
on:
84
pull_request:
95
branches:
@@ -16,20 +12,22 @@ on:
1612

1713
jobs:
1814
send_status:
15+
permissions:
16+
contents: read
17+
id-token: write # Required for dd-octo-sts OIDC token
1918
runs-on: ubuntu-latest
2019
if: >
2120
github.event.pull_request.draft == false &&
2221
!contains(github.event.pull_request.labels.*.name, 'ci/skip') &&
2322
!contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/') &&
2423
contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated/')
2524
steps:
26-
- name: Get GitHub App token
25+
- name: Get GitHub token via dd-octo-sts
2726
id: get_token
28-
uses: actions/create-github-app-token@v1
27+
uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
2928
with:
30-
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
31-
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
32-
repositories: datadog-api-spec
29+
scope: DataDog/datadog-api-spec
30+
policy: datadog-api-client-java.approved_status.post-review-status
3331
- name: Post PR review status check
3432
uses: DataDog/github-actions/post-review-status@v2
3533
with:

0 commit comments

Comments
 (0)