Skip to content

Commit 6d3d042

Browse files
committed
Use dd-octo-sts tokens
1 parent 938b2b7 commit 6d3d042

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/update-jmxfetch-submodule.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@ jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
permissions:
12-
contents: write
13-
pull-requests: write
12+
contents: write # Required to create and push branch
13+
id-token: write # Required for OIDC token federation
1414
steps:
15+
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
16+
id: octo-sts
17+
with:
18+
scope: DataDog/dd-trace-java
19+
policy: self.update-jmxfetch-submodule.create-pr
20+
1521
- name: Checkout repository
1622
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
1723

@@ -31,7 +37,7 @@ jobs:
3137
git push -u origin ${{ steps.define-branch.outputs.branch }} --force
3238
- name: Commit and push changes
3339
env:
34-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
40+
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }}
3541
run: |
3642
git config user.name "github-actions[bot]"
3743
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
@@ -45,7 +51,7 @@ jobs:
4551
git push origin ${{ steps.define-branch.outputs.branch }}
4652
- name: Create pull request
4753
env:
48-
GH_TOKEN: ${{ github.token }}
54+
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
4955
run: |
5056
gh pr create --title "Update agent-jmxfetch submodule" \
5157
--base master \

0 commit comments

Comments
 (0)