Skip to content

Commit 0c8fd49

Browse files
Use dd-octo-sts. (#3908)
1 parent 667ed65 commit 0c8fd49

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,18 @@ jobs:
5454
needs:
5555
- test
5656
- examples
57+
permissions:
58+
id-token: write
5759
steps:
58-
- name: Get GitHub App token
59-
if: github.event_name == 'pull_request'
60-
id: get_token
61-
uses: actions/create-github-app-token@v1
60+
- uses: DataDog/dd-octo-sts-action@96a25462dbcb10ebf0bfd6e2ccc917d2ab235b9a # v1.0.4
61+
id: octo-sts
6262
with:
63-
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
64-
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
65-
repositories: datadog-api-spec
63+
scope: DataDog/datadog-api-spec
64+
policy: datadog-api-client-go.github.post-status-check.pr
6665
- name: Post status check
6766
uses: DataDog/github-actions/post-status-check@v2
6867
with:
69-
github-token: ${{ steps.get_token.outputs.token }}
68+
github-token: ${{ steps.octo-sts.outputs.token }}
7069
repo: datadog-api-spec
7170
status: ${{ (needs.test.result == 'cancelled' || needs.examples.result == 'cancelled') && 'pending' || (needs.test.result == 'success' && needs.examples.result == 'success') && 'success' || 'failure' }}
7271
context: master/unit

0 commit comments

Comments
 (0)