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