Skip to content

Commit a3db3f7

Browse files
committed
use dd-octo-sts policy for rustfmt commits
1 parent 8a8ed91 commit a3db3f7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/rustfmt-auto.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,22 @@ jobs:
1010
contains(github.event.pull_request.labels.*.name, 'commit-rustfmt-changes') &&
1111
!startsWith(github.head_ref, 'mq-working-branch')
1212
permissions:
13+
id-token: write
1314
contents: write
1415
steps:
1516
- name: Checkout sources
1617
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
1718
with:
1819
ref: ${{ github.head_ref }}
20+
- name: Get GitHub App token
21+
uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
22+
id: octo-sts
23+
with:
24+
scope: DataDog/libdatadog
25+
policy: self.write.rustfmt
1926
- name: Install nightly-2026-02-08 toolchain and rustfmt
2027
run: rustup install nightly-2026-02-08 && rustup default nightly-2026-02-08 && rustup component add rustfmt
2128
- name: Run rustfmt and commit changes
2229
uses: mbrobbel/rustfmt-check@e7ac5685995bd39fb14f6c83fa6f10627e92e680 # master
2330
with:
24-
token: ${{ secrets.GITHUB_TOKEN }}
31+
token: ${{ steps.octo-sts.outputs.token }}

0 commit comments

Comments
 (0)