Skip to content

Commit 552d485

Browse files
committed
ci: set an allowlist to publish packages
1 parent ecb47c8 commit 552d485

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/release-proposal-dispatch.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,30 @@ jobs:
5555
fi
5656
echo "No release proposal is ongoing."
5757
58+
check-membership:
59+
permissions:
60+
id-token: write # Enable OIDC
61+
steps:
62+
- uses: DataDog/dd-octo-sts-action@08f2144903ced3254a3dafec2592563409ba2aa0 # v1.0.1
63+
id: octo-sts
64+
with:
65+
scope: DataDog/libdatadog # target repository
66+
policy: self.read.members # trust policy in target repo, without the .sts.yaml extension
67+
68+
- name: Check if user is in the team allowed to make crate releases
69+
id: check
70+
uses: TheModdingInquisition/actions-team-membership@057d91bb80f2976a1bc6dfab5b4ae1da9aebbd89 #v1.0.1
71+
with:
72+
team: 'apm-common-components-core'
73+
organization: 'Datadog'
74+
token: ${{ steps.octo-sts.outputs.token }} # Needs 'read:org' scope
75+
exit: false
76+
77+
- name: Check output
78+
run: |
79+
echo "User is permitted: ${{ steps.check.outputs.permitted }}"
80+
echo "Teams: ${{ steps.check.outputs.teams }}"
81+
5882
update-release-branch:
5983
permissions:
6084
id-token: write # Enable OIDC

0 commit comments

Comments
 (0)