diff --git a/.github/workflows/cmd.yml b/.github/workflows/cmd.yml index 27c7df78e5..5dc810d3c5 100644 --- a/.github/workflows/cmd.yml +++ b/.github/workflows/cmd.yml @@ -78,11 +78,20 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Get command + uses: actions-ecosystem/action-regex-match@v2 + id: get-pr-comment + with: + text: ${{ github.event.comment.body }} + regex: '^(\/cmd )(.*)$' + - name: Save output of help id: help + env: + CMD: ${{ steps.get-pr-comment.outputs.group2 }} # to avoid "" around the command run: | echo 'help<> $GITHUB_OUTPUT - python3 .github/scripts/cmd/cmd.py --help >> $GITHUB_OUTPUT + python3 .github/scripts/cmd/cmd.py $CMD >> $GITHUB_OUTPUT echo 'EOF' >> $GITHUB_OUTPUT - name: Comment PR (Help)