chore: added get-workflow-token script

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-01-18 14:29:16 +01:00
parent d622d37fd6
commit 6108041ce4
+7 -1
View File
@@ -12,6 +12,12 @@ jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Get Token
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v1
with:
application_id: ${{ secrets.BACKSTAGE_WORKFLOW_MEMBER_READ_APP_ID }}
application_private_key: ${{ secrets.BACKSTAGE_WORKFLOW_MEMBER_READ_PRIVATE_KEY }}
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
@@ -21,7 +27,7 @@ jobs:
- uses: actions/github-script@v5
id: get-all-group-members
with:
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
github-token: ${{ steps.get_workflow_token.outputs.token }}
script: |
// Get all teams and their respective members
const {data: teams} = await github.request('GET /orgs/{org}/teams', {