mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-24 16:09:08 +00:00
32 lines
968 B
YAML
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
|