Skip to content

Commit ef19df3

Browse files
authored
use dd-octo-sts for tag creation (#300)
use dd-octo-sts for tag creation
1 parent 6ab3e39 commit ef19df3

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
issuer: https://token.actions.githubusercontent.com
2+
3+
subject: repo:DataDog/pprof-nodejs:environment:npm
4+
5+
claim_pattern:
6+
event_name: push
7+
job_workflow_ref: DataDog/pprof-nodejs/\.github/workflows/release\.yml@refs/heads/v[0-9]+\.x
8+
ref: refs/heads/v[0-9]+\.x
9+
repository: DataDog/pprof-nodejs
10+
11+
permissions:
12+
contents: write

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,15 @@ jobs:
2020
runs-on: ubuntu-latest
2121
environment: npm
2222
permissions:
23-
id-token: write # Required for OIDC
23+
id-token: write # Required for OIDC
2424
contents: write
2525
steps:
26-
- uses: actions/checkout@v2
26+
- uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3
27+
id: octo-sts
28+
with:
29+
scope: DataDog/pprof-nodejs
30+
policy: self.github.release.push-tags
31+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
2732
- uses: actions/download-artifact@v4
2833
- uses: actions/setup-node@v3
2934
with:
@@ -37,4 +42,4 @@ jobs:
3742
echo "json=$content" >> $GITHUB_OUTPUT
3843
- run: |
3944
git tag v${{ fromJson(steps.pkg.outputs.json).version }}
40-
git push origin v${{ fromJson(steps.pkg.outputs.json).version }}
45+
git push https://x-access-token:${{ steps.octo-sts.outputs.token }}@github.com/${{ github.repository }}.git v${{ fromJson(steps.pkg.outputs.json).version }}

0 commit comments

Comments
 (0)