Use token from CryoInTheCloud bot for /condalock comment #432
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Slash Command Dispatch | |
| on: | |
| issue_comment: | |
| types: [created] | |
| # Add "edited" type for test purposes. Where possible, avoid using to prevent processing unnecessary events. | |
| # types: [created, edited] | |
| permissions: # added using https://github.com/step-security/secure-workflows | |
| contents: read | |
| jobs: | |
| slashCommandDispatch: | |
| permissions: | |
| pull-requests: write # for peter-evans/slash-command-dispatch to create PR reaction | |
| if: ${{ github.event.issue.pull_request }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Generate token from CryoInTheCloud bot | |
| - uses: actions/create-github-app-token@bf559f85448f9380bcfa2899dbdc01eb5b37be3a # v3.0.0-beta.2 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.APP_ID }} | |
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
| - name: Slash Command Dispatch | |
| uses: peter-evans/slash-command-dispatch@13bc09769d122a64f75aa5037256f6f2d78be8c4 # v4.0.0 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| reaction-token: ${{ secrets.GITHUB_TOKEN }} | |
| commands: | | |
| condalock | |
| issue-type: pull-request | |
| permission: none |