charts/.github/workflows/slash-command-dispatch.yaml
Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs e062593a2f
[ci] Better workflow (#991)
* [ci] Better workflow
* Remove skip checks, those are native now

Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
2021-06-12 09:07:32 +02:00

32 lines
968 B
YAML

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