Fix issue-labeled GitHub Action using app permissions (#76114)

This commit is contained in:
Armand Grillet 2023-10-06 12:25:01 +02:00 committed by GitHub
parent c4874f97f8
commit d8357342a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,6 +62,14 @@ jobs:
replace-with: "'"
flags: 'g'
- name: Get Token
id: get_workflow_token
uses: peter-murray/workflow-application-token-action@v2
with:
application_id: ${{ secrets.APP_GRAFANA_TEAM_CHECKER_ID }}
application_private_key: ${{ secrets.APP_GRAFANA_TEAM_CHECKER_KEY }}
organization: grafana
- name: "Check that issue author is not part of the team"
if: ${{ env.TEAM != 'null' }}
run: |
@ -75,7 +83,7 @@ jobs:
echo "USER_FOUND=maybe" >> $GITHUB_ENV
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}
- name: "Send Slack notification"
if: ${{ (env.CHANNEL != 'null') && ((env.USER_FOUND == 'false') || (env.TEAM != 'null')) }}