File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Check membership
2+
3+ on :
4+ pull_request :
5+ types : [opened, edited]
6+ jobs :
7+ # get-token:
8+ # name: read contents of another repo
9+ # runs-on: ubuntu-latest
10+ # permissions:
11+ # id-token: write # Needed to federate tokens.
12+ # steps:
13+ # - uses: DataDog/dd-octo-sts-action@08f2144903ced3254a3dafec2592563409ba2aa0 # v1.0.1
14+ # id: octo-sts
15+ # with:
16+ # scope: DataDog/libdatadog # target repository
17+ # policy: YOUR_POLICY # trust policy in target repo, without the .sts.yaml extension
18+ # - name: Use GH token
19+ # run: |
20+ # gh auth status
21+ # gh repo list --visibility=internal DataDog
22+ # env:
23+ # GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
24+ # GH_PAGER: cat # (unrelated) needed to disable paging of gh cli
25+
26+ check-membership :
27+ runs-on : ubuntu-latest
28+ steps :
29+ - name : Check if user is in the team allowed to make crate releases
30+ id : check
31+ uses : TheModdingInquisition/actions-team-membership@057d91bb80f2976a1bc6dfab5b4ae1da9aebbd89 # v1.0.1
32+ with :
33+ team : ' libdatadog-owners'
34+ organization : ' Datadog'
35+ # token: ${{ GH_TOKEN }} # Needs 'read:org' scope
36+ exit : false
37+
38+ - name : Check output
39+ run : |
40+ echo "User is permitted: ${{ steps.check.outputs.permitted }}"
41+ echo "Teams: ${{ steps.check.outputs.teams }}"
42+
You can’t perform that action at this time.
0 commit comments