Skip to content

Command-bot translated to work as an action

License

Notifications You must be signed in to change notification settings

mak-parity/cmd-action

 
 

Repository files navigation

CMD-Action

GitHub action which provides interfaces for executing pre-defined commands on GitHub Actions.

How it works

CMD-Action executes arbitrary commands on GitHub Actions from commands in pull request comments.

Configuration

Create a file named .github/workflows/cmd-action.yml and add the following:

name: Command-Action

on: 
  pull_request:

jobs:
  cmd-check:
    runs-on: ubuntu-latest
    name: Bot
    steps:
      - uses: actions/[email protected]
      - uses: paritytech/cmd-action@main
        with: 
          commands-directory: '.github/scripts'
          GITHUB_TOKEN: ${{ github.token }}

Inputs

You can find all the inputs in the action file, but let's walk through each one of them:

  • GITHUB_TOKEN: Token to access to the repository.
    • required
    • This is provided by the repo, you can simply use ${{ github.token }}.
  • commands-directory: Location of the commands configuration files.
    • Optional: Defaults to ./github/commands .
    • Make sure that this directory contains the commands extension as .yml (not .yaml)

About

Command-bot translated to work as an action

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 89.8%
  • JavaScript 7.0%
  • Dockerfile 3.2%