Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
ci: Use a GitHub App for chatops token (#316)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastian Czech <[email protected]>
  • Loading branch information
migara and sebastianczech authored Sep 13, 2023
1 parent 348e164 commit de96fc9
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/chatops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,21 @@ jobs:
})
console.log(pr.data.head.ref)
return pr.data.head.ref
- name: Generate GitHub token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.CHATOPS_APP_ID }}
private_key: ${{ secrets.CHATOPS_APP_PRIVATE_KEY }}
installation_retrieval_mode: id
installation_retrieval_payload: ${{ secrets.CHATOPS_APP_INSTALLATION_ID }}

- name: "dispatch test command on branch: ${{ steps.pr.outputs.result }}"
id: scd
uses: peter-evans/slash-command-dispatch@v3
with:
token: ${{ secrets.CHATOPS }}
token: ${{ steps.generate-token.outputs.token }}
issue-type: pull-request
dispatch-type: workflow
permission: maintain
Expand Down Expand Up @@ -74,4 +83,4 @@ jobs:
> ChatOPS run cancelled.
> See [job run log](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.
reactions: 'confused'
reactions-edit-mode: replace
reactions-edit-mode: replace

0 comments on commit de96fc9

Please sign in to comment.