Skip to content

Commit

Permalink
Update cmd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mordamax committed Jul 24, 2024
1 parent ca27c75 commit 905e42e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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<<EOF' >> $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)
Expand Down

0 comments on commit 905e42e

Please sign in to comment.