name: Dispatch Commands on: issue_comment: types: [created] jobs: # If someone with write access comments "/update-readme" on a pull request, emit a repository_dispatch event update-readme: runs-on: ubuntu-latest # Only run for PRs, not issue comments if: ${{ github.event.issue.pull_request }} steps: - name: Generate token id: generate_token uses: tibdex/github-app-token@v1 with: app_id: ${{ secrets.K8S_AT_HOME_APP_ID }} private_key: ${{ secrets.K8S_AT_HOME_APP_PRIVATE_KEY }} - name: Slash Command Dispatch uses: peter-evans/slash-command-dispatch@v1 env: TOKEN: ${{ steps.generate_token.outputs.token }} with: token: ${{ env.TOKEN }} # GitHub App installation access token generated above reaction-token: ${{ secrets.GITHUB_TOKEN }} issue-type: pull-request commands: update-readme named-args: true permission: write