-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (35 loc) · 1.09 KB
/
cmd-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Command-Action
on:
pull_request:
issue_comment:
types: [created]
jobs:
cmd-check:
runs-on: ubuntu-latest
outputs:
commands: ${{ steps.command.outputs.commands }}
branch: ${{ steps.command.outputs.branch }}
name: Bot
steps:
- uses: paritytech/cmd-action/check@main
id: command
cmd-run:
needs: [cmd-check]
if: ${{ github.event.issue.pull_request }}
continue-on-error: true
# We set the current machine here (to differ between ours and generic ones)
runs-on: ubuntu-latest
strategy:
matrix:
command: ${{ fromJson(needs.cmd-check.outputs.commands) }}
name: Run command
steps:
- uses: paritytech/cmd-action/run@error/report-with-comment
with:
branch: ${{ needs.cmd-check.outputs.branch }}
command: ${{ matrix.command }}
pr-number: ${{ github.event.issue.number || github.event.pull_request.number }}
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: cmd-action - changes
branch: ${{ needs.cmd-check.outputs.branch }}