Skip to content

Trigger a Workflow from a PR Comment with Custom Commands

Notifications You must be signed in to change notification settings

cssnr/pr-comment-trigger-action

Repository files navigation

GitHub Tag Major GitHub Tag Minor GitHub Release Version GitHub Dist Size Workflow Release Workflow Test Workflow lint Quality Gate Status GitHub Last Commit Codeberg Last Commit GitHub Top Language GitHub repo size GitHub Discussions GitHub Forks GitHub Repo Stars GitHub Org Stars Discord

PR Comment Trigger Action

Caution

This action is currently under development and not ready for use.
Please check back soon...

This actions triggers on PR comments, and triggers workflows based on the value of the comment (the command). Commands can be configured in YAML or passed as a string in the Workflow.

Inputs

Input Req. Default Value Input Description
file - .github/pr-comment.yaml Location of config file.
yaml - - Inline YAML config.
json - - Inline JSON config.
token - github.token For use with a PAT

At least one config input is required!
If the file is not found the Default Config will be used (TBD).

👀 View Example Job Summary

Coming Soon...


Coming Soon...

- name: 'PR Comment Trigger Action'
  uses: cssnr/pr-comment-trigger-action@master
  with:
    file: .github/pr-comment.yaml

Permissions

This action requires the following permissions:

permissions:
  pull-requests: write

Permissions documentation for Workflows and Actions.

Outputs

Output Description
id Workflow ID
- name: 'PR Comment Trigger Action'
  id: test
  uses: cssnr/pr-comment-trigger-action@master

- name: 'Echo Output'
  run: |
    echo "id: '${{ steps.test.outputs.id }}'"

Examples

💡 Click on an example heading to expand or collapse the example.

name: 'Test'

on:
  workflow_dispatch:
  push:

jobs:
  test:
    name: 'Test'
    runs-on: ubuntu-latest
    timeout-minutes: 5
    permissions:
      contents: write

    steps:
      - name: 'Checkout'
        uses: actions/checkout@v4

      - name: 'PR Comment Trigger Action'
        id: test
        uses: cssnr/pr-comment-trigger-action@master

      - name: 'Echo Outputs'
        run: |
          echo "id: '${{ steps.test.outputs.id }}'"

For more examples, you can check out other projects using this action:
https://github.com/cssnr/pr-comment-trigger-action/network/dependents

Tags

The following rolling tags are maintained.

Version Tag Rolling Bugs Feat. Name Target Example
GitHub Tag Major Major vN.x.x vN
GitHub Tag Minor Minor vN.N.x vN.N
GitHub Release Micro vN.N.N vN.N.N

You can view the release notes for each version on the releases page.

The Major tag is recommended. It is the most up-to-date and always backwards compatible. Breaking changes would result in a Major version bump. At a minimum you should use a Minor tag.

Support

For general help or to request a feature, see:

If you are experiencing an issue/bug or getting unexpected results, you can:

For more information, see the CSSNR SUPPORT.md.

Contributing

Currently, the best way to contribute to this project is to star this project on GitHub.

For more information, see the CSSNR CONTRIBUTING.md.

Additionally, you can support other GitHub Actions I have published:

For a full list of current projects to support visit: https://cssnr.github.io/

About

Trigger a Workflow from a PR Comment with Custom Commands

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published