Skip to content

Slash Command

Slash Command #269

Workflow file for this run

name: 'Slash Command'
on:
issue_comment:
types:
- created
concurrency:
group: slash-command-${{ github.ref }}
cancel-in-progress: true
jobs:
catalog-command:
name: Catalog
runs-on: ubuntu-24.04
outputs:
continue: ${{ steps.catalog.outputs.continue }}
steps:
# https://github.com/marketplace/actions/create-github-app-token
- name: Create GitHub App Token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
# https://github.com/marketplace/actions/command-action
- name: Catalog Command
id: catalog
uses: github/command@b3be99cbe249d555aa4511c99b1aea219313f071 # v1.2.2
with:
github_token: ${{ steps.app-token.outputs.token }}
command: /catalog
reaction: "eyes"
allowed_contexts: "pull_request"
skip_ci: "true"
skip_reviews: "true"
catalog:
needs: catalog-command
if: ${{ needs.catalog-command.outputs.continue == 'true' }}
name: Catalog
uses: ./.github/workflows/wc-firebase-hosting.yml
permissions:
contents: read
pull-requests: write
deployments: write
with:
gh-app-id: ${{ vars.BOT_APP_ID }}
environment: 'development'
project-id: 'asis-quest-dev'
secrets:
gh-app-private-key: ${{ secrets.BOT_PRIVATE_KEY }}
firebase-service-account: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEV }}
gen-command:
name: Gen Command
runs-on: ubuntu-24.04
outputs:
continue: ${{ steps.gen-command.outputs.continue }}
steps:
# https://github.com/marketplace/actions/create-github-app-token
- name: Create GitHub App Token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: app-token
with:
app-id: ${{ vars.BOT_APP_ID }}
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
# https://github.com/marketplace/actions/command-action
- name: Gen Command
id: gen-command
uses: github/command@b3be99cbe249d555aa4511c99b1aea219313f071 # v1.2.2
with:
github_token: ${{ steps.app-token.outputs.token }}
command: /gen
reaction: "eyes"
allowed_contexts: "pull_request"
skip_ci: "true"
skip_reviews: "true"
gen:
needs: gen-command
if: ${{ needs.gen-command.outputs.continue == 'true' }}
name: Gen
uses: ./.github/workflows/wc-auto-correct.yml
with:
gh-app-id: ${{ vars.BOT_APP_ID }}
secrets:
gh-app-private-key: ${{ secrets.BOT_PRIVATE_KEY }}